[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

Peter Kleiweg report at bugs.python.org
Wed Jan 12 23:19:51 CET 2011


Peter Kleiweg <pkleiweg at xs4all.nl> added the comment:

Pierre Quentel wrote:
- get the binary layer of stdout : out = sys.stdout.detach()

You can't do that! That makes sys.stdout unavaible to the program that is importing the cgi module.

Cgi should access and process sys.stdin only, as binary by means of sys.stdin.detach()

The cgi module is used to handle form data and uploaded files. But the resulting page is usually written by the main program or another module, using sys.stdout

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4953>
_______________________________________


More information about the Python-bugs-list mailing list