Zope stdin

Janez Jere janez.jere at void.si
Sun Mar 10 18:32:00 EST 2002


HHi,
could anyone help me port my simple cgi to zope script. Problem which I 
am unable to solve is reading posted raw data (legacy client posts a xml 
document to my cgi and expects a result).

Among all my attempts the closest solutions are:
request.get(BODY) # BODYFILE a
and
request.stdin.read() # but it is not allowed to access read method.

#echo cgi
import sys, os
length = os.environ['CONTENT_LENGTH']
print 'Content-Type: text/plain'
print
print sys.stdin.read(int(length))

Thank for help.
Janez




More information about the Python-list mailing list