3 webfs \- world wide web file system
24 presents a file system interface to the parsing and retrieving
33 is specified, will post a service file descriptor in
37 flag enables general debug printing to standard error while the
39 flag enables 9P debug prints.
41 If the environment variable
43 is set, all HTTP request initiated by
45 will be made through that proxy url.
48 presents a three-level file system suggestive
49 of the network protocol hierarchies
54 The top level contains the two files:
61 file is used to maintain parameters global to the instance of
65 file yields the current values of the parameters.
66 Writing strings of the form
67 .RB `` attr " " value ''
68 sets a particular attribute.
70 The following global parameters can be set:
73 Sets the HTTP user agent string.
76 Sets the request timeout in milliseconds.
79 Flushes any associated authentication information for
82 or all resources if no url was given.
84 .BI preauth " url realm"
85 Preauthenticates all resources under
89 using HTTP Basic authentication. This will cause
91 to preemptively send the resulting authorization information
92 not waiting for the server to respond with an
93 HTTP 401 Unauthorized status.
95 The top-level directory also contains
96 numbered directories corresponding to connections, which
97 may be used to fetch a single URL.
98 To allocate a connection, open the
100 file and read a number
105 file is equivalent to the file
107 A connection is assumed closed once all files in its
108 directory have been closed, and is then will be reallocated.
110 Each connection has a URL attribute
113 This URL may be an absolute URL such as
114 .I http://www.lucent.com/index.html
115 or a relative URL such as
119 attribute sets the URL against which relative URLs
121 Once the URL has been set by writing to the
123 file of the connection, its pieces can be retrieved via
124 individual files in the
132 .UU url http://pete:secret@www.example.com:8000/cgi/search?q=kittens#results
136 .UU host www.example.com
142 If there is associated data to be posted with the request,
149 initiates the request. If the request fails,
154 file will fail and return a error string.
158 file has been opened, response headers appear
159 as files in the connection directory. For example
162 file yields the MIME content type of the body data.
163 If the request was redirected, the URL represented
166 directory will change to the final destination.
168 The resulting data may be read from
172 The following is a list of attributes that can be
173 set for a connection prior to initiating the request:
179 Sets a custom useragent string to be used with the request.
182 Sets the MIME content type of the postbody.
185 Usually, the HTTP method used is
189 file is opened first or
191 otherwise. This can be overridden with the
193 attribute to send arbitrary HTTP requests.
196 Adds arbitrary HTTP headers to be sent with
202 .B /sys/src/cmd/webfs
209 should be running and mounted on
211 otherwise cookies will be ignored.
214 first appeared in Plan 9 from Bell Labs. It was
215 rewritten from scratch for 9front (January, 2012).