From: Fredrik Tolf Date: Tue, 28 Aug 2012 00:57:59 +0000 (+0200) Subject: Decode CGI CONTENT_{TYPE,LENGTH} properly into ihead. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=3e71b44baaee85e8030d51a0563d9c68a7e1ca01;p=wrw.git Decode CGI CONTENT_{TYPE,LENGTH} properly into ihead. --- diff --git a/wrw/req.py b/wrw/req.py index 861454b..4f93eb9 100644 --- a/wrw/req.py +++ b/wrw/req.py @@ -73,6 +73,10 @@ class origrequest(request): self.servername = env["SERVER_NAME"] self.https = "HTTPS" in env self.ihead = headdict() + if "CONTENT_TYPE" in env: + self.ihead["Content-Type"] = env["CONTENT_TYPE"] + if "CONTENT_LENGTH" in env: + self.ihead["Content-Length"] = env["CONTENT_LENGTH"] self.ohead = headdict() for k, v in env.items(): if k[:5] == "HTTP_":