From dd47ec98e2030c51b78ddf18a5765cad8bdc642d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 9 Jun 1998 19:49:16 +0000 Subject: [PATCH] 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. --- Lib/cgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/cgi.py b/Lib/cgi.py index 97ecbbbbc661..5493092340be 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -802,7 +802,7 @@ def __init__(self, fp=None, headers=None, outerboundary="", 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'):