I examined all of the environment variables available, and they
all have the complete URL and not the redirect text alone, sadly.
It would be possible to say allow something like this in HTTPRequest:
if variable == 0:
raise WebKit exception with informative error message
self._environ['PATH_INFO'] = self._environ['PATH_INFO'][variable:]
where the variable was set in the config files, defaulting to a length
of zero. The documentation could discuss this briefly or give a URL to
a discussion page.
Geoffrey Talvola writes:
> There must be some way to examine os.environ and determine the
> right thing to do automatically? Or at least we could make this
> a configuration setting so you don't have to hack this into the
> code directly.
> - Geoff
> On Thursday November 22, 2001 04:45 pm, James R. Phillips wrote:
>> I am on a virtual server that redirects CGI scripts,
>> the company is http://nexpoint.org. Upon installing the
>> latest Webware beta on my new site, I found that WebKit
>> would not work properly. I always received 404 errors for
>> page not found.
>> After gnashing of teeth, wailing, debugging, etc. etc.
>> I found that HTTPRequest's urlPath() method returned an
>> incorrect value, that is it returned what the virtual site
>> host redirected rather than what WebKit was expecting.
>> I found a cheap and dirty fix for this. I changed
>> urlPath in order to cut out the redirect. My version of
>> HTTPRequest's urlPath method now begins:
>> self._absolutepath = 0
>> if self._environ.has_key('REDIRECT_URL'):
>> self._environ['PATH_INFO'] = self._environ['PATH_INFO'][19:]
>> This is a dirty fix as my redirect starts with 19 characters,
>> composed of "/cgi-bin/server.cgi" where I rename OneShot.cgi or
>> WebKit.cgi to server.cgi as needed. Although this works for me
>> it would be better if a generic solution can be found.
>> Randy Phillips