diff options
author | Michael Bisbjerg <michael@mbwarez.dk> | 2013-05-21 15:57:14 +0200 |
---|---|---|
committer | Michael Bisbjerg <michael@mbwarez.dk> | 2013-05-21 15:57:14 +0200 |
commit | 125b3e5e5bd0635de85aefa3c47e56be8ae514b6 (patch) | |
tree | e0e197b25fb2df683aef872b79b51ad12d416058 /libmproxy | |
parent | 3460d56fcc59f058d2c07e716a613c15d91f2748 (diff) | |
download | mitmproxy-125b3e5e5bd0635de85aefa3c47e56be8ae514b6.tar.gz mitmproxy-125b3e5e5bd0635de85aefa3c47e56be8ae514b6.tar.bz2 mitmproxy-125b3e5e5bd0635de85aefa3c47e56be8ae514b6.zip |
- Quick-fix for issue #128
New bug: It correct-cases Content-Length for any webserver sending other casings, like CONTENT-LENGTH.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/flow.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 1d15029b..10c5da5d 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -542,7 +542,7 @@ class Request(HTTPMsg): headers["host"] = [utils.hostport(self.scheme, self.host, self.port)] content = self.content if content: - headers["content-length"] = [str(len(content))] + headers["Content-Length"] = [str(len(content))] else: content = "" if self.close: @@ -737,7 +737,7 @@ class Response(HTTPMsg): ['proxy-connection', 'transfer-encoding'] ) if self.content: - headers["content-length"] = [str(len(self.content))] + headers["Content-Length"] = [str(len(self.content))] proto = "HTTP/%s.%s %s %s"%(self.httpversion[0], self.httpversion[1], self.code, str(self.msg)) data = (proto, str(headers)) return FMT%data @@ -1548,7 +1548,7 @@ class FlowMaster(controller.Master): if f.request: f.request._set_replay() if f.request.content: - f.request.headers["content-length"] = [str(len(f.request.content))] + f.request.headers["Content-Length"] = [str(len(f.request.content))] f.response = None f.error = None self.process_new_request(f) |