mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
Default content-type to application/x-www-form-urlencoded at the top
level of a form. This means that browsers that omit the content-type header when sending a POST command aren't penalized so heavily.
This commit is contained in:
parent
e614fb12a0
commit
dd47ec98e2
1 changed files with 1 additions and 1 deletions
|
@ -802,7 +802,7 @@ class FieldStorage:
|
|||
headers = {'content-type':
|
||||
"application/x-www-form-urlencoded"}
|
||||
if headers is None:
|
||||
headers = {}
|
||||
headers = {'content-type': "application/x-www-form-urlencoded"}
|
||||
if environ.has_key('CONTENT_TYPE'):
|
||||
headers['content-type'] = environ['CONTENT_TYPE']
|
||||
if environ.has_key('CONTENT_LENGTH'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue