From 3e71b44baaee85e8030d51a0563d9c68a7e1ca01 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 28 Aug 2012 02:57:59 +0200 Subject: [PATCH] Decode CGI CONTENT_{TYPE,LENGTH} properly into ihead. --- wrw/req.py | 4 ++++ 1 file changed, 4 insertions(+) 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_": -- 2.11.0