Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0185283

Browse files
committed
Treat "HEAD" same as "GET", so that CGI scripts won't fail.
1 parent 2349015 commit 0185283

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/cgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def __init__(self, fp=None, headers=None, outerboundary="",
790790
self.strict_parsing = strict_parsing
791791
if environ.has_key('REQUEST_METHOD'):
792792
method = string.upper(environ['REQUEST_METHOD'])
793-
if method == 'GET':
793+
if method == 'GET' or method == 'HEAD':
794794
if environ.has_key('QUERY_STRING'):
795795
qs = environ['QUERY_STRING']
796796
elif sys.argv[1:]:

0 commit comments

Comments
 (0)