mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Make Tim O'Malley's requested change: in FieldStorage.__init__(), when
method='GET', always get the query string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an explicitly passed in fp.
This commit is contained in:
parent
b9838d97ad
commit
b1b4f94527
1 changed files with 2 additions and 1 deletions
|
@ -763,6 +763,7 @@ class FieldStorage:
|
|||
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 @@ class FieldStorage:
|
|||
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:]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue