diff --git a/Lib/cgi.py b/Lib/cgi.py index e3842e6aafd..97ecbbbbc66 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -763,6 +763,7 @@ def __init__(self, fp=None, headers=None, outerboundary="", Arguments, all optional: fp : file pointer; default: sys.stdin + (not used when the request method is GET) headers : header dictionary-like object; default: taken from environ as per CGI spec @@ -789,7 +790,7 @@ def __init__(self, fp=None, headers=None, outerboundary="", self.strict_parsing = strict_parsing if environ.has_key('REQUEST_METHOD'): method = string.upper(environ['REQUEST_METHOD']) - if not fp and method == 'GET': + if method == 'GET': if environ.has_key('QUERY_STRING'): qs = environ['QUERY_STRING'] elif sys.argv[1:]: