HTTP/1.0 Web Server

I wrote this program around April, 2006 for inet4021 – Network Programming. The requirement was to create a web server adhering to RFC1945 (HTTP/1.0 specification) and achieving concurrency. I finished early, so I decided to add thread-safe logging (which, interestingly, led me to find out that my web server, running on my home connection on port 5555, got crawled by msnbot within a few hours of going online) and a chrooted environment (when spanwed as root, and then also suid’s to ‘nobody’).

The full project, including a README, makefile, and sample public_html directory is available here, including a bzipped tarball of all files. The source code is also provided below (reformatted from the tar’d copy for better 80-column compliance).

 

Edit: Well, GeSHi or PCRE, used in the syntax highlighting in my blog, is puking on this file for some reason. You’ll have to look at it in your own editor, if you want to see it. Grab the source code.