chiark
/
gitweb
/
~mdw
/
chopwood
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7d0eb62
)
cgi.py: Emit the error about `POST' content-type correctly.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 13 Jul 2013 15:34:40 +0000
(16:34 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 6 Apr 2014 11:22:39 +0000
(12:22 +0100)
cgi.py
patch
|
blob
|
blame
|
history
diff --git
a/cgi.py
b/cgi.py
index 01fb868862dca5ad83ffaf8d76a8232cecca1b25..6006062eddc5132ec5ba980b722ba2695f280007 100644
(file)
--- 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: