index.txt
HTTPD(8) System Manager's Manual 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/name‐ space.http), using version 1.0 of the HTTP protocol. It is usually ex‐ ecuted 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 network 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 executes the file /bin/http/server to finish servicing the request. Method, ver‐ sion, 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) HTTPD(8)