[FRPythoneers] pcgi

Rob Riggs rriggs at doubleclick.net
Thu Mar 8 01:25:51 MST 2001

Yes, that would be me. The thing to know is that pcgi sends data out in a
single stream. The data is formatted as follows:

xxxxxxxxxx - a 10 digit zero padded integer string of value x
nnnnnnnnnn - x bytes of header data, \000 delimited, ie
yyyyyyyyyy - a 10 digit zero padded integer string of value y
nnnnnnnnnn - y bytes of body data (MIME encoded, generally from a POST)

I use PCGI in production (and have for over a year now). I have a really
nice Python module for interfacing to PCGI, but there is still some
question as to whether or not I can release the code to the public. I'll
check with the powers that be at some point.

But you are right, the PCGI module is not well documented. I dissected the
Zope code that provides PCGI support to figure out the details of how to
talk to the pcgi-wrapper.

Ken Kinder wrote:

> I heard someone at our last meeting mention they were trying out pcgi?
> Now maybe I'm being dense, but I looked these two places regarding pcgi:
>         http://starship.python.net/crew/jbauer/persistcgi/
>         http://cvs.zope.org/Zope2/pcgi/
> Both of which seem to leave out how using form keys, cookies, and other
> information out. With normal CGI, you get everything you need with
> environment variables, but pcgi doesn't seem to document how to do it
> using its socket system.
> Whoever used pcgi, did you ever find some documentation on how to grab
> form fields, get/set cookies, detect the web browser, etc?

More information about the FRPythoneers mailing list