durusmail: quixote-users: Fix Trailing Slash bug?
Fix Trailing Slash bug?
2002-06-19
2002-06-19
2002-06-19
Fix Trailing Slash bug?
Greg Ward
2002-06-19
On 19 June 2002, Patrick K. O'Brien said:
> But MoinMoin needed the same thing and the solution was to add this to the
> config:
>
> import os
> os.environ['SCRIPT_NAME'] = '/wiki'
>
> So I should be able to do something similar with Quixote. Thanks.

Blechh.  That should work as long as you do it before instantiating the
current HTTPRequest object.  If it's done early in your driver script,
you'll be fine.

Alternately, you could subclass Publisher and add a start_request()
method that does

  request.environ['SCRIPT_NAME'] = "/web"

...but why bother?  If munging os.environ works, it works.

        Greg



reply