3 webfs \- world wide web file system
20 presents a file system interface to the parsing and retrieving
29 is specified, will post a service file descriptor
34 presents a three-level file system suggestive
35 of the network protocol hierarchies
40 The top level contains three files:
48 file is used to maintain parameters global to the instance of
52 file yields the current values of the parameters.
53 Writing strings of the form
54 .RB `` attr " " value ''
55 sets a particular attribute.
61 flag used by the 9P library, discussed in
66 prints 9P message traces on standard error,
69 present more debugging, at the whim of the library.
70 The default for this and the following debug flags is
74 This variable is the level of debugging output about the file system module.
77 This variable is the level of debugging output about the cookie module.
80 This variable is the level of debugging output about URL parsing.
83 This flag controls whether to accept cookies presented by remote web servers.
84 (Cookies are described below, in the discussion of the
99 This flag controls whether to present stored cookies to remote web servers.
104 Web servers can respond to a request with a message
105 redirecting to another page.
107 makes no effort to determine whether it is in an infinite
109 Instead, it gives up after this many redirects.
115 sends the value of this attribute in its
117 header in its HTTP requests.
119 .RB `` "webfs/2.0 (plan 9)" .''
122 The top-level directory also contains
123 numbered directories corresponding to connections, which
124 may be used to fetch a single URL.
125 To allocate a connection, open the
127 file and read a number
132 file is equivalent to the file
134 A connection is assumed closed once all files in its directory
135 have been closed, and is then will be reallocated.
137 Each connection has its own private set of
143 variables, initialized to the defaults set in the
146 file. The per-connection
148 file allows editing the variables for this particular connection.
150 Each connection also has a URL string variable
153 This URL may be an absolute URL such as
154 .I http://www.lucent.com/index.html
155 or a relative URL such as
159 string variable sets the URL against which relative URLs
161 Once the URL has been set,
162 its pieces can be retrieved via individual files in the
166 parses the following URL syntaxes; names in italics are
167 the names of files in the
171 \fIscheme\f5:\fIschemedata
173 \f5http://\fIhost\f5/\fIpath\fR[\f5?\fIquery\fR][\f5#\fIfragment\fR]
175 \f5ftp://\fR[\fIuser\fR[\f5:\fIpassword\fR]\f5@\fR]\fP\f5\fIhost\f5/\fIpath\fR[\f5;type=\fIftptype\fR]
179 If there is associated data to be
180 posted with the request, it can be written to
184 initiates the request.
185 The resulting data may be read from
188 After the request has been executed, the MIME content type
195 file contains the internal set of HTTP cookies, which
196 are used by HTTP servers to associate requests with persistent
197 state such as user profiles.
198 It may be edited as an ordinary text file.
199 Multiple instances of
203 share cookies by keeping their internal set
207 .BR $home/lib/webcookies ),
208 which has the same format.
210 These files contain one line per cookie;
211 each cookie comprises some number of
214 Cookie attributes are:
217 The name of the cookie on the remote server.
220 The value associated with that name on the remote server.
221 The actual data included when a cookie is sent back
223 .IB \fR``\fIname = value\fR''
228 are the values associated with the
237 is an IP address, the cookie can only be used for URLs
240 equal to that IP address.
243 must be a pattern beginning with a dot, and
244 the cookie can only be used for URLs with a
249 For example, a cookie with
250 .B domain=.bell-labs.com
254 .IR www.research.bell-labs.com
256 .IR www.not-bell-labs.com ).
259 The cookie can only be used for URLs with a path
264 The version of the HTTP cookie specification, specified by the server.
267 A comment, specified by the server.
270 The cookie expires at time
272 which is a decimal number of seconds since the epoch.
275 The cookie may only be used over secure
278 Secure connections are currently unimplemented.
281 The domain associated with this cookie was set by
282 the server (rather than inferred from a URL).
285 The path associated with this cookie was set by the
286 server (rather than inferred from a URL).
289 The server presented the cookie in ``Netscape style,'' which
290 does not conform to the cookie standard, RFC2109.
291 It is assumed that when presenting the cookie to the server,
292 it must be sent back in Netscape style as well.
295 .B /sys/src/cmd/webfs/webget.c
298 .B /sys/src/cmd/webfs
303 It's not clear what the relationship between