diff options
author | Guido van Rossum <guido@python.org> | 1998-06-09 19:49:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-06-09 19:49:16 (GMT) |
commit | dd47ec98e2030c51b78ddf18a5765cad8bdc642d (patch) | |
tree | 39b37d9e1d471124c9508fa7f341a1486e285260 /Lib/cgi.py | |
parent | e614fb12a0da06b787e498bfa6a9ef608b123824 (diff) | |
download | cpython-dd47ec98e2030c51b78ddf18a5765cad8bdc642d.zip cpython-dd47ec98e2030c51b78ddf18a5765cad8bdc642d.tar.gz cpython-dd47ec98e2030c51b78ddf18a5765cad8bdc642d.tar.bz2 |
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.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-x | Lib/cgi.py | 2 |
1 files changed, 1 insertions, 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'): |