HTTPD(8) HTTPD(8) NAME httpd, echo - HTTP server SYNOPSIS http/httpd [ -n namespace ] srvname netname netdir http/echo [ -n namespace ] [ -d domain ] [ -r remoteip ] method version uri [ search ] DESCRIPTION Httpd serves the file system described by namespace (default /lib/namespace.http), using version 1.0 of the HTTP proto- col. It is usually executed by listen(8) in response to an incoming call on TCP port 80, the HTTP port. Srvname is the name of the service invoked, typically tcp80, netname is the name of the network, typically TCP, and netdir is the net- work directory for the connection. Httpd supports only the GET and HEAD methods of the HTTP protocol. The Content-type (default application/octet- stream) and Content-encoding (default binary) of a file are determined by looking for suffixes of the file name in /sys/lib/http. If the requested URI begins with /magic/server/, httpd exe- cutes the file /bin/http/server to finish servicing the request. Method, version, and uri are those received on the first line of the request, which is the only line read by httpd before executing the magical server. Echo is a trivial server that just returns the method, URI, any search, and the headers sent by the client. FILES /sys/lib/http content type description file /lib/namespace.http default namespace file for httpd SOURCE /sys/src/cmd/httpd SEE ALSO newns in auth(2), listen(8) Page 1 Plan 9 (printed 11/18/24)