The thttpd web server provides a script name that matches everything
between the hostname and the query string---so for the darcs
repository, it would claim something like ./darcs.cgi/darcs/
Needless to say, this doesn't work---someone complained about it on
darcs-users in mid-2005, but gave up on using thttpd and switched
to a different web server.
This is all that's necessary to get darcs.cgi to work on web servers
with liberal interpretations of the standard, like thttpd:
--- darcs/cgi/darcs.cgi 2006-01-07 20:55:27.316551517 -0500
+++ darcs.cgi 2006-01-07 23:50:20.644970854 -0500
@@ -311,6 +311,8 @@
$script_name =~ qr~^([\w/.\-]+)$~ or die qq(bad script_name
"$script_name");
$script_name = $1;
+ $script_name =~ s|(.*darcs.cgi).*|\1|;
+
# untaint simple parameters, which can only have chars matching \w+
my $cmd = safe_param('c', '^(\w+)$', 'browse');
my $sort = safe_param('s', '^(\w+)$', '');
--
Brian Sniffen [EMAIL PROTECTED]
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel