[Zope] newbie CGI question
Tres Seaver
tseaver@palladion.com
Wed, 22 Mar 2000 14:50:54 -0600
Michel Pelletier wrote:
>
> You know after reading this thread I was pretty surprised that we didn't
> have simply execcgi ability in Zope, considering how trivial it is.
>
> I'll look into something like this possibly being a feature.
>
> Thanks Tres!
>
> -Michel
Note that the version I posted has several rough edges:
* It doesn't propagate the CGI environment to the child process. We
could fix this on Unixen by doing a fork() and some execve() magic,
but then we lose the convenience of popen(); CreateProces() on Win32
requires special handling, too.
* It doesn't propagate the input stream some CGI's may expect to find.
"Temp files and fork() and dup(), oh my!"
* Win32 versions to use the win32.popen(), instead of os.popen().
* The error handling is ugly.
* It double-buffers results (which could get ugly if the CGI does
weird stuff, or returns a really huge result).
In short, its a pretty ugly bandaid, recommended only for easing the CGI
withdrawal jitters. :) Doing the Right Thing (TM) involves reimplementing a big
chunk of a web server, which is probably why Zope Didn't Go There already.
mod_rewrite looks pretty sane by comparison.
Tres.
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com