Commit 582d14cb authored by Jim Fulton's avatar Jim Fulton

Changed to use standard cgi module. Yey!!!

This incorprates fixed binary data handling and get's rid of newcgi.
Note that we need a new fix for windows. :-(
parent 160652b3
...@@ -518,7 +518,7 @@ Publishing a module using Fast CGI ...@@ -518,7 +518,7 @@ Publishing a module using Fast CGI
o Configure the Fast CGI-enabled web server to execute this o Configure the Fast CGI-enabled web server to execute this
file. file.
$Id: Publish.py,v 1.33 1997/02/07 16:00:46 jim Exp $""" $Id: Publish.py,v 1.34 1997/02/07 18:42:34 jim Exp $"""
#' #'
# Copyright # Copyright
# #
...@@ -572,7 +572,7 @@ $Id: Publish.py,v 1.33 1997/02/07 16:00:46 jim Exp $""" ...@@ -572,7 +572,7 @@ $Id: Publish.py,v 1.33 1997/02/07 16:00:46 jim Exp $"""
# #
# See end of file for change log. # See end of file for change log.
# #
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[11:-2]
def main(): def main():
...@@ -582,11 +582,11 @@ def main(): ...@@ -582,11 +582,11 @@ def main():
if __name__ == "__main__": main() if __name__ == "__main__": main()
import sys, os, string, types, newcgi, regex, regsub import sys, os, string, types, cgi, regex, regsub
from CGIResponse import Response from CGIResponse import Response
from Realm import Realm, allow_group_composition from Realm import Realm, allow_group_composition
from newcgi import FieldStorage from cgi import FieldStorage, MiniFieldStorage
class ModulePublisher: class ModulePublisher:
...@@ -967,7 +967,7 @@ def str_field(v): ...@@ -967,7 +967,7 @@ def str_field(v):
if type(v) is types.ListType: if type(v) is types.ListType:
return map(str_field,v) return map(str_field,v)
if type(v) is types.InstanceType and v.__class__ is newcgi.MiniFieldStorage: if type(v) is types.InstanceType and v.__class__ is FieldStorage:
v=v.value v=v.value
elif type(v) is not types.StringType: elif type(v) is not types.StringType:
try: try:
...@@ -1360,7 +1360,7 @@ class CGIModulePublisher(ModulePublisher): ...@@ -1360,7 +1360,7 @@ class CGIModulePublisher(ModulePublisher):
if environ['REQUEST_METHOD'] != 'GET': fp=stdin if environ['REQUEST_METHOD'] != 'GET': fp=stdin
except: pass except: pass
form=newcgi.FieldStorage(fp=fp,environ=environ,keep_blank_values=1) form=FieldStorage(fp=fp,environ=environ,keep_blank_values=1)
request=self.request=Request(environ,form,stdin) request=self.request=Request(environ,form,stdin)
self.response=Response(stdout=stdout, stderr=stderr) self.response=Response(stdout=stdout, stderr=stderr)
self.stdin=stdin self.stdin=stdin
...@@ -1407,6 +1407,11 @@ def publish_module(module_name, ...@@ -1407,6 +1407,11 @@ def publish_module(module_name,
# #
# $Log: Publish.py,v $ # $Log: Publish.py,v $
# Revision 1.34 1997/02/07 18:42:34 jim
# Changed to use standard cgi module. Yey!!!
# This incorprates fixed binary data handling and get's rid of newcgi.
# Note that we need a new fix for windows. :-(
#
# Revision 1.33 1997/02/07 16:00:46 jim # Revision 1.33 1997/02/07 16:00:46 jim
# Made "method" check more general by trying to get im_func rather than # Made "method" check more general by trying to get im_func rather than
# by testing for type.MethodType. Du. # by testing for type.MethodType. Du.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment