[Zope-dev] The Zope CGI executable, rewriting URLs on IIS

Martijn Pieters mj@antraciet.nl
Thu, 27 May 1999 10:23:58 +0200


At 23:25 26/05/99 , alex@mop.no wrote:
>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?

An ISAPI version would be fantastic!

The Win32 executable connects to the backend service, specified with the 
registry key HKEY_LOCAL_MACHINE/SOFTWARE/Digital 
Creations/zope/<executable_name>/

It basically is a Win32 implementaion of PCGI. I suggest looking at Jeff 
Bauer's PCGI pages to get more info:

  http://starship.python.net/crew/jbauer/persistcgi/pcgifile/


--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------