]> granicus.if.org Git - python/commitdiff
Default content-type to application/x-www-form-urlencoded at the top
authorGuido van Rossum <guido@python.org>
Tue, 9 Jun 1998 19:49:16 +0000 (19:49 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 9 Jun 1998 19:49:16 +0000 (19:49 +0000)
level of a form.  This means that browsers that omit the content-type
header when sending a POST command aren't penalized so heavily.

Lib/cgi.py

index 97ecbbbbc661ca1440f76e82148cd7083f3d27e7..5493092340be1695f88cb4396c5d169ce8e01d19 100755 (executable)
@@ -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'):