Decode CGI CONTENT_{TYPE,LENGTH} properly into ihead.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 28 Aug 2012 00:57:59 +0000 (02:57 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 28 Aug 2012 00:57:59 +0000 (02:57 +0200)
wrw/req.py

index 861454b..4f93eb9 100644 (file)
@@ -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_":