Commit dd47ec98 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent e614fb12
......@@ -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'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment