S-HTTP-SERVER is a minimal standalone HTTP Server. This simple package is used as a building block in a number of other open source projects, as can be seen from this description of some other Open Source Common Lisp packages.
S-HTTP-SERVER can:
S-HTTP-SERVER is considered new code.
S-HTTP-SERVER is written in ANSI standard Common Lisp and should be portable across any CL implementation.
You can download the latested released tarball of the S-HTTP-SERVER package from http://homepage.mac.com/svc/s-http-server/s-http-server.tar.gz. This archive is signed on release by Sven Van Caekenberghe, whose public key is published at http://homepage.mac.com/svc/sven-public-ascii.gpg, the signature is in http://homepage.mac.com/svc/s-http-server/s-http-server.tar.gz.asc.
Alternatively you can access the DARCS repository at http://www.beta9.be/darcs/s-base64. For a good description on how to use DARCS see http://dirkgerrits.com/programming/erlisp/download/.
$ darcs get http://www.beta9.be/darcs/s-http-server
The S-HTTP-SERVER package is loaded using ASDF. There is an excellent tutorial on ASDF to get you started. Alternatively you can use ASDF-INSTALL. There is an great tutorial on ASDF-INSTALL to get you on the way.
CL-USER 1 > (asdf:oos 'asdf:load-op :s-http-server)
Basically, you create an S-HTTP-SERVER object and start it. Out of the box only the status/debug page http://localhost:1701/s-http-server is served. By registering new context handlers you can configure the server further. The static-resource-handler hosts static documents from a root directory in the file system. It is possible to write your own handlers, look at the code of static-resource-handler and s-http-server-handler for guidance.
CL-USER 1 > (in-package :s-http-server) #<The S-HTTP-SERVER package, 90/128 internal, 31/64 external> S-HTTP-SERVER 2 > (defvar *server* (make-s-http-server)) *SERVER* S-HTTP-SERVER 3 > (start-server *server*) ;; S-HTTP-SERVER: Started a new server on port 1701 #<S-HTTP-SERVER "s-http-server" port 1701 running 10C5F6EB> S-HTTP-SERVER 4 > (register-context-handler *server* "/my-site" 'static-resource-handler :arguments '("/var/www/")) ((STATIC-RESOURCE-HANDLER "/my-site" "/var/www/") (S-HTTP-SERVER-HANDLER "/s-http-server" :BUILTIN)) S-HTTP-SERVER 5 > (stop-server *server*) ;; S-HTTP-SERVER: Stopped server #<S-HTTP-SERVER "s-http-server" port 1701 not running 10C5F6EB>
There is automatically generated API Reference documentation available for the S-HTTP-SERVER package.
There is no mailing list for this project.
Release Notes:
There is currently no TODO list.
Nothing appropriate.
There are no known bugs.
S-HTTP-SERVER was written by Sven Van Caekenberghe.
S-HTTP-SERVER is being maintained by Sven Van Caekenberghe.
You are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser General Public License (http://opensource.franz.com/preamble.html), also known as the LLGPL.
This is a new project.
The reference for the HTTP protocol is RFC 2616.