Implement url and scriptname autodetection.
authorAlberto Bertogli <albertito@gmail.com>
local dateMon, 31 Jul 2006 04:10:20
dateMon, 31 Jul 2006 04:10:20
hash20060731041020-57897-20935659fb9d498e005b92de09f151aea91206b7
Implement url and scriptname autodetection.

This patch implements autodetection of the url and scriptname of darcsweb.
It's based on a suggestion from Tobias Gruetzmacher.

It relies on variables according to the CGI/1.1 standard, and works only if
cache is not enabled. If it is, the variables must be set manually as before.

The problem with the cache is multi-host access: if a page not in the cache is
accesed as http://hosta/dw/..., then the cached page will reference "hosta".
If then it's accessed from hostb, there will be a reference to hosta that it's
possibly broken. It's actually a quite common case when you have localhost and
external access.
2 file(s) changed:
config.py.sample +10 -6
darcsweb.cgi +21 -5