Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
# status

quite useful, has been in production for quite some time.


# intro

shttpd is a simple httpd.

features:

- http/1.0, http/1.1 (keep-alive, chunked responses).  no "http/0.9".
- cgi and scgi support
- virtual hosts
- determining content-type based on file extension
- error/access logging
- index file serving, html directory listings
- http basic authentication
- "range" requests, for random access to files
- redirections with regular expressions
- configuration in attrdb format
- as compliant as possible, where reasonable
- mindful of security

see the manual page for full documentation


# download

get the latest version from:

	http://www.ueber.net/code/r/httpd


# install

first make sure you have "http", the http library installed, see
http://www.ueber.net/code/r/http.

make sure you have $ROOT set, now "mk install" to compile and install
the files.

when building from within inferno, insert SYSHOST=Inferno and ROOT=
in the mk invocations to override the values in the mkconfig.


# licence

all files written by me (i.e. all except the rfcs in doc/) are
in the public domain.  for bugs, questions, comments, etc., contact
me at mechiel@ueber.net.


# non-features

some features will not be implemented.  for example:

- connection rate limiting.  should be done at a higher level, e.g. firewall.

# testing/todo

doc/testing.txt can be used for testing.  it has to be done manually,
enough corner cases have not been tested, but quite a few have.

todo:

- when responding with chunked data, can we embed an error message in a chunks comment-part when an error with reading the data occurs?
- support transfer-encoding chunked and compressed content-encodings from client?
- check for security issues with http
- think of ssl?
- try to fix dir listings for paths with multiple slashes in them.  firefox breaks on them, is firefox right?
- test with other browsers

Recent activity

mjlrem

Commits by mjlrem were pushed to mjl/httpd

c07e1c4 - also allow absolute redirs to https, not just http
mjl

Commits by mjl were pushed to mjl/httpd

0992eec - support returning gzip-compressed version of requested paths. the paths for which to allow this are specified with "-z path". they are prefix-matched. the config file ...
mjl

Commits by mjl were pushed to mjl/httpd

edd1104 - add mkconfig, mention in README.
mjl

Commits by mjl were pushed to mjl/httpd

cb53e5b - reset variable after having warned about its bad value, not before warning.
mjl

Commits by mjl were pushed to mjl/httpd

5b3ecfb - rename from plain "httpd" to "shttpd", to prevent clash with inferno's httpd. the clash was really only with the manual page, as this was installed ...
mjl

Commits by mjl were pushed to mjl/httpd

92c3e7b - with virtual hosting, don't look for directories named "host:port", but look for directories named "host!port". clarify virtual host config resolving in the manual page. fix ...
mjl

Commits by mjl were pushed to mjl/httpd

92c394f - it's cache-control: max-age=X, not cache-control: maxage=X.
mjl

Commits by mjl were pushed to mjl/httpd

655c19b - don't set (wrong) content-length on range-request (which gets a "partial response"). found after report from jeff sickel that hg clone static-url's hang with more recent ...
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.