durusmail: quixote-users: request.get_path() problem/bug
request.get_path() problem/bug
2002-08-02
2002-08-05
request.get_path() problem/bug
Andreas Kostyrka
2002-08-01
Am Don, 2002-08-01 um 17.50 schrieb Neil Schemenauer:
> I'm not sure I understand what you are trying to do.  I'm guessing that
> you are trying to find the "base URL" for a Quixote application.  This
> is something that Quixote does not know.  I would suggest adding it to
But it's basically os.environ["SCRIPT_NAME"] before the publisher starts
to work with it. That's my problem. You do not need to tell the
application. (I know, because there are certain cases with
BoboServer/ZServer where you have to tell it the appserver. But this is
only the case when you run a reverse proxy setup.)

On startup I get:
SCRIPT_NAME         : '/fax'
from os.environ.

In my method request.environ, the value is mangled

SCRIPT_NAME         : '/fax/q/'

that I just question ;)

> an application specific config file if you need it.  I usually try to
> use relative paths.
Doesn't work for objects that can be reached by different paths.

And when you change the structure, for example add one level of folder
structure, as I have done, this just breaks. In my case it was even more
misterious because SCRIPT_NAME is correct for objects on the "first"
level (because nothing has been added), and I coded my methods to rely
on SCRIPT_NAME. (after having checked with a non quixote cgi script that
it indeed provides the correct information.)

And that's something I'd call a bug (either in implementation or in
design), because it looses some important information without the
possibility of recovering it.
(Actually, for the time being I'll make the cgi script capture the
information and store it in my published module :) )

Andreas



reply