Powered by
Movable Type 3.38 mod_perl/2

 October 2007 Archives

2007, October 24 (Wed)

Linux, Programmierung thttpd and hgweb.cgi

hgweb.cgi, which is a Pythonscript to provide webaccess to a hg repository, does not work out of the box with thttpd.

The error is:

KeyError: 'REQUEST_URI'
args = ('REQUEST_URI',)

The quick-and-dirty fix is kinda simple; write a small wrapper which sets REQUEST_URI and runs hgweb.cgi. The content of REQUEST_URI seems to do not matter at all.

#!/bin/sh
export REQUEST_URI="/blafuck/"
exec ./hgweb.cgi