[Zope] newbie CGI question

Michel Pelletier michel@digicool.com
Wed, 22 Mar 2000 13:13:18 -0800


What an exellent deflation. ;)

Tres Seaver wrote:
> 
> 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.

Environemt propagation after a fork wouldn't be too hard, and I was
kindof assuming punting on Win32.
 
>  * The error handling is ugly.

There wouldn't need to be much, just catching errors from the Zope side
code, anything the CGI raises is it's own problem.
 
>  * It double-buffers results (which could get ugly if the CGI does
>    weird stuff, or returns a really huge result).

Yeah yer right there...
 
> 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.

Ok you sold me, I wasn't volunteering anyway (I said I'd *look* at it.
;).

-Michel