diff --git a/tornado/wsgi.py b/tornado/wsgi.py index 6bf180f90d..7c261ffe4e 100644 --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -107,13 +107,13 @@ def __init__(self, environ): if environ.get("CONTENT_TYPE"): self.headers["Content-Type"] = environ["CONTENT_TYPE"] if environ.get("CONTENT_LENGTH"): - self.headers["Content-Length"] = int(environ["CONTENT_LENGTH"]) + self.headers["Content-Length"] = environ["CONTENT_LENGTH"] for key in environ: if key.startswith("HTTP_"): self.headers[key[5:].replace("_", "-")] = environ[key] if self.headers.get("Content-Length"): self.body = environ["wsgi.input"].read( - self.headers["Content-Length"]) + int(self.headers["Content-Length"])) else: self.body = "" self.protocol = environ["wsgi.url_scheme"]