3 webfs \- world wide web file system
22 presents a file system interface to the parsing and retrieving
31 is specified, will post a service file descriptor in
34 If the environment variable
36 is set, all HTTP request initiated by
38 will be made through that proxy url.
41 presents a three-level file system suggestive
42 of the network protocol hierarchies
47 The top level contains the two files:
54 file is used to maintain parameters global to the instance of
58 file yields the current values of the parameters.
59 Writing strings of the form
60 .RB `` attr " " value ''
61 sets a particular attribute.
63 The following global parameters can be set:
66 Sets the HTTP user agent string.
69 Sets the request timeout in seconds.
72 Flushes any associated authentication information for
75 or all resources if no url was given.
77 .BI preauth " url realm"
78 Preauthenticates all resources under
82 using HTTP Basic authentication. This will cause
84 to preemptively send the resulting authorization information
85 not waiting for the server to respond with an
86 HTTP 401 Unauthorized status.
88 The top-level directory also contains
89 numbered directories corresponding to connections, which
90 may be used to fetch a single URL.
91 To allocate a connection, open the
93 file and read a number
98 file is equivalent to the file
100 A connection is assumed closed once all files in its
101 directory have been closed, and is then will be reallocated.
103 Each connection has a URL attribute
106 This URL may be an absolute URL such as
107 .I http://www.lucent.com/index.html
108 or a relative URL such as
112 attribute sets the URL against which relative URLs
114 Once the URL has been set by writing to the
116 file of the connection, its pieces can be retrieved via
117 individual files in the
125 .UU url http://pete:secret@www.example.com:8000/cgi/search?q=kittens#results
129 .UU host www.example.com
135 If there is associated data to be posted with the request,
142 initiates the request. If the request fails,
147 file will fail and return a error string.
151 file has been opened, response headers appear
152 as files in the connection directory. For example
155 file yields the MIME content type of the body data.
156 If the request was redirected, the URL represented
159 directory will change to the final destination.
161 The resulting data may be read from
165 The following is a list of attributes that can be
166 set to do a connection prior initiating the request:
172 Sets a custom useragent string to be used with the request.
175 Sets the MIME content type of the postbody.
178 Usually, the HTTP method used is
182 file is opend first or
184 otherwise. This can be overridden with the
186 attribute so send arbitrary HTTP requests.
189 Adds arbitrary HTTP headers to be send with
195 .B /sys/src/cmd/webfs
202 should be running and mounted on
204 otherwise cookies will be ignored.
207 first appeared in Plan 9 from Bell Labs. It was
208 rewritten from scratch for 9front (January, 2012).