X-Git-Url: https://git.distorted.org.uk/~mdw/chopwood/blobdiff_plain/7d0eb62ccc2f2560cd1c4fea667ebee58fa2008c..76ee7d4f64bc1f20013f44c8045cd708ef0b9641:/cgi.py diff --git a/cgi.py b/cgi.py index 01fb868..6006062 100644 --- a/cgi.py +++ b/cgi.py @@ -401,7 +401,8 @@ def cgiparse(): if not n.isdigit(): raise U.ExpectedError, (500, "Invalid CONTENT_LENGTH") n = int(n, 10) - if getenv('CONTENT_TYPE') != 'application/x-www-form-urlencoded': + ct = getenv('CONTENT_TYPE') + if ct != 'application/x-www-form-urlencoded': raise U.ExpectedError, (500, "Unexpected content type `%s'" % ct) q = SYS.stdin.read(n) if len(q) != n: