[Pythonmac-SIG] Re: PythonCGISlave update

Noboru Yamamoto noboru.yamamoto@kek.jp
Thu, 30 Mar 2000 10:05:52 +0900


Just van Rossum wrote:
> 
> At 10:37 PM +0900 28-03-2000, Noboru Yamamoto wrote:
> >Thanks for a PythonCGIServer.py program. That is a program I wanted for
> >a while.
> >I added a little enhancement to the program. It now can send back data
> >longer than
> >32 KB to WebStar server. It uses  a <SEND_PARTIAL> mechanism to send
> >back data to the WWW server.
> 
> Very cool! Thanks.
> 
> >I have tested it with WebStar 4.0(demo version) and it should work with
> >WebStar 3.x.
> 
> I would like to incorporate the enhancements into PythonCGISlave, but I
> wonder: do other web servers support the same mechanism? In other words,
> can we turn this into something independant from WebStar? As it is now it
> would blow up if the CGI would try send >32k of data under *any* other
> server, since it explicitly start an AE connection with WebStar. I think
> the incoming AE contains info about the web server, so I think we should
> try and use that.
I have NO exprerience with WWW server other than WebStar. It seems unlikely
that other WWW server porgrams support "SEND_PARTIAL" mechanism as same
way as
WebStart.

I will introduce new class, PythonCGIslaveFroWebStar for example, which
inherite PythonCGISlave class from the PythonCGISlave.py. So that
WebStar specific code 
will be separated from the PythonCGISlave.py. It should be noted that we
need to
put  "if __name__ == '__main__': " statement in the PythonCGISlave.py. 

I will post the source when I finish a test. 

> 
> I've appended my latest working copy, which besides PythonCGISlave now also
> contains BuildCGIApplet, which does what I've described earlier: it
> converts a CGI script to an applet, but wrapped in PythonCGISlave's
> compatibility layer.
> 
> Just
> 

Noboru