Comanche

Comanche is an extremely simple HTTP (web) server written entirely in Python. At present it does not support CGI or SSL and uses a simple fork-on-demand architecture. Read the detailed description for more information. Comanche is named after an American Indian tribe, like some other web servers you may have heard of (e.g. Apache, Cherokee). I don't really know anything about American Indians, but I know a surprising amount about helicopter gunships, which are sometimes named after tribes as well: I got the name Comanche from Boeing-Sikorsky's RAH-66 Comanche "stealth" armed reconnaissance chopper.

Requirements

Comanche depends only upon Python. It uses the fork system call, so I don't know if it will work on non-Unix systems.

License

Comanche is distributed under a standard 3-clause BSD license. It's as free as software gets.

Download

Download the latest version of Comanche, Comanche 20070627 (released 27 June, 2007).

You can also download older versions of Comanche, and see what has changed between versions, in the Old Versions section.

Detailed description

Comanche is a simple, forking web server written in Python. It was written primarily to teach me how to do socket programming in Python, not to be an industrial strength server you might use in the real world. However, I loved writing it and will continue to hack on it in the hopes that one day it will be an industrial strength server you might use in the real world. In the mean time, it is really only good for two things:

For the love of Darwin, don't use Comanche to serve content to the outside world yet. My main aim was to get something that works and to learn some stuff in the process. Things like security, stability and performance were not priorities. There are probably situations under which it will break, and may be exploitable security holes with very nasty consequences.

Just so you don't download it and get disappointed, here is a big list of things that Comanche does not currently do:

I'd like to think it will do all of them one day.

Complete Instructions

Running Comanche requires just two things: setting some basic options by modifying the source file and then feeding the source file to the Python interpreter. At the moment, Comanche runs in the foreground (i.e. it is not a daemon) and prints logging details to standard output. Very simple.

Options are set in the source file by adjusting the values of a few global variables with names all in uppercase, defined on lines 38 through 45. By default, they look like this:

VERSION=20070624
BINDADDRESS="127.0.0.1"
PORT=8080
QUEUELENGTH=10
DEFAULTTIMEOUT=3
DOCBASE="/var/www/htdocs/"
INDEXFILES=["index.html"]
VIRTUALHOSTING=False

These variables are fairly self-explanatory:

Old versions

The list below details all versions of Comanche which have ever been released, as well as summarising the changes between versions.