WEBCOOKIES(4) WEBCOOKIES(4)
NAME
webcookies - HTTP cookie manager
SYNOPSIS
webcookies [ -f cookiefile ] [ -m mtpt ] [ -s service ]
DESCRIPTION
Webcookies manages a set of HTTP cookies, which are used to
associate HTTP requests with persistent state (such as user
profiles) on many web servers.
Webcookies reads cookiefile (default $home/lib/webcookies)
and mounts itself at mtpt (default /mnt/webcookies). If
service is specified, cookiefs will post a service file
descriptor in /srv/service.
The cookie file contains one cookie per line; each cookie
comprises some number of attr=value pairs. Cookie
attributes are:
name=name The name of the cookie on the remote
server.
value=value The value associated with that name on
the remote server. The actual data
included when a cookie is sent back to
the server is ``name=value'' (where,
confusingly, name and value are the val-
ues associated with the name and value
attributes.
domain=domain The domain within which the cookie can
be used. If domain is an IP address,
the cookie can only be used when con-
necting to a web server at that IP
address. If domain is a pattern begin-
ning with a dot, the cookie can only be
used for servers whose name has domain
as a suffix. For example, a cookie with
domain=.bell-labs.com may be used on the
web sites www.bell-labs.com and
www.research.bell-labs.com.
path=path The cookie can only be used for URLs
with a path (the part after
http://hostname) beginning with path.
version=version The version of the HTTP cookie specifi-
cation, specified by the server.
comment=comment A comment, specified by the server.
expire=expire The cookie expires at time expire, which
is a decimal number of seconds since the
epoch.
secure=1 The cookie may only be used over secure
Page 1 Plan 9 (printed 10/25/25)
WEBCOOKIES(4) WEBCOOKIES(4)
(https) connections.
explicitdomain=1 The domain associated with this cookie
was set by the server (rather than
inferred from a URL).
explicitpath=1 The path associated with this cookie was
set by the server (rather than inferred
from a URL).
netscapestyle=1 The server presented the cookie in
``Netscape style,'' which does not con-
form to the cookie standard, RFC2109.
It is assumed that when presenting the
cookie to the server, it must be sent
back in Netscape style as well.
Webcookies serves a directory containing two files. The
first, cookies, is a textual representation of the cookie
file, which can be edited to change the set of cookies cur-
rently held. The second, http, is intended to be used by
HTTP clients to access cookies. Upon opening http, the
client must write a full URL to it. After writing the URL,
reading from the file will yield any HTTP Cookie: headers
that should be included in the request for this particular
URL. Once the request has been made, any Set-Cookie: lines
in the HTTP response header should be written to the file to
save them for next time. If cookiefs decides not to accept
the cookie (as outlined in RFC2109, section 4.3.4), no indi-
cation is given.
SOURCE
/sys/src/cmd/webcookies.c
SEE ALSO
webfs(4), hget(1)
Page 2 Plan 9 (printed 10/25/25)