I tried renaming WebKit/OneShot.cgi to index.cgi to use it as the
default DirectoryIndex. If I access it as
everything works as expected. If I access it as
I get an infinite loop of 301 redirects.
I found the source of the infinite loop. It's happening in
Application.handleDeficientDirectoryURL. If I change the code at the start
if transaction.request().uri() == "/":
newURL = "/index.cgi/"
uri = string.split(transaction.request().uri(), '?')
uriEnd = string.split(uri, '/')[-1]
# @@ gat 2000-05-19: this was changed to use a relative redirect starting with "." to force
# a client redirect instead of a server redirect. This fixes problems on IIS.
uri = './' + uriEnd + '/'
newURL = string.join(uri, '?')
the infinite loop disappears, but this requires the assumption that
index.cgi is the DirectoryIndex handler. Is there some way to do this in a
less fragile manner?
Skip Montanaro (skip@... - http://www.mojam.com/)
Get latest updates about Open Source Projects, Conferences and News.