[Zope-dev] The Zope CGI executable, rewriting URLs on IIS
alex@mop.no
alex@mop.no
Wed, 26 May 1999 23:25:25 +0200
What exactly does the Win32 Zope CGI executable _do_?
I mean the one that comes with Zope and is stored as
<installationname>.exe (eg., website.exe) under the web server directory
you selected as part of the installation sequence. I assume it
communicates with the Zope service, but how? Using HTTP?
The reason I ask is that I'd like to emulate the behaviour in an ISAPI
filter DLL. The cool thing about filters is that your filter can grab
all requests and preprocess them any way it likes.
I have already written a filter which rewrites URLs so that eg.,
"/QuickStart" becomes "/cgi-bin/zope.exe/QuickStart", and this works
perfectly, except that Zope always forces <base href="..."> in
documents, so only the initial document you refer to accepts this URL
okay. All others go to the zope.exe URL. Even if I patch HTTPResponse.py
to _not_ do this (which probably has major consequences for some apps,
though), Zope often uses SCRIPT_NAME, PATH_INFO etc. for a lot of URLs,
and my filter cannot modify these variables to reflect the "fake" URL.
(Anybody with me so far?)
One solution would be to force Zope to always use a specific base URL,
but I don't know even how to do this. Anyway I _presume_ that the CGI
executable actually sends the path information to Zope, and so I need a
little bit more information. Anyone?
--
Alexander Staubo http://www.mop.no/~alex/
"In the end, we all assume room temperature." --John Maynard Keynes