You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cgi.py should document the need for binary stdin/stdout #54689
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-01-31.04:45:51.924>created_at=<Date2010-11-21.05:43:08.287>labels= ['type-bug', 'library', 'docs']
title='cgi.py should document the need for binary stdin/stdout'updated_at=<Date2011-01-31.04:45:51.923>user='https://bugs.python.org/vpython'
CGI is a bytestream protocol. Python assumes a text mode encoding for stdin and stdout, this is inappropriate for the CGI interface.
CGI should provide an API to "do the right thing" to make stdin and stout binary mode interfaces (including mscvrt setting to binary on Windows). Failing that, it should document the need to do so in CGI applications.
Failing that, it should be documented somewhere, CGI seems the most appropriate place to me.
Activity
vpython commentedon Nov 21, 2010
CGI is a bytestream protocol. Python assumes a text mode encoding for stdin and stdout, this is inappropriate for the CGI interface.
CGI should provide an API to "do the right thing" to make stdin and stout binary mode interfaces (including mscvrt setting to binary on Windows). Failing that, it should document the need to do so in CGI applications.
Failing that, it should be documented somewhere, CGI seems the most appropriate place to me.
vpython commentedon Jan 31, 2011
Fixed by bpo-10841 and bpo-4953.