From: Guido van Rossum Date: Thu, 25 Jun 1998 02:40:17 +0000 (+0000) Subject: Treat "HEAD" same as "GET", so that CGI scripts won't fail. X-Git-Tag: v1.5.2a1~425 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01852838f31b612cd1ad84b87076ff25b9ff9d00;p=thirdparty%2FPython%2Fcpython.git Treat "HEAD" same as "GET", so that CGI scripts won't fail. --- diff --git a/Lib/cgi.py b/Lib/cgi.py index d45ed266eedd..3a4e2359919a 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -790,7 +790,7 @@ class FieldStorage: self.strict_parsing = strict_parsing if environ.has_key('REQUEST_METHOD'): method = string.upper(environ['REQUEST_METHOD']) - if method == 'GET': + if method == 'GET' or method == 'HEAD': if environ.has_key('QUERY_STRING'): qs = environ['QUERY_STRING'] elif sys.argv[1:]: