diff options
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/flow.py | 11 | ||||
-rw-r--r-- | libmproxy/proxy.py | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 549942a5..b33707ca 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -536,7 +536,6 @@ class Request(HTTPMsg): 'proxy-connection', 'keep-alive', 'connection', - 'content-length', 'transfer-encoding' ] ) @@ -551,15 +550,15 @@ class Request(HTTPMsg): headers["connection"] = ["close"] if not _proxy: return FMT % ( - self.method, - self.path, + self.method, + self.path, self.httpversion[0], self.httpversion[1], - str(headers), + str(headers), content ) else: - return FMT_PROXY % ( + return FMT_PROXY % ( self.method, self.scheme, self.host, @@ -738,7 +737,7 @@ class Response(HTTPMsg): headers = self.headers.copy() utils.del_all( headers, - ['proxy-connection', 'connection', 'keep-alive', 'transfer-encoding'] + ['proxy-connection', 'transfer-encoding'] ) content = self.content if content: diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index c7e5d972..3be20761 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -123,7 +123,6 @@ def read_http_body(rfile, connection, headers, all, limit): content = rfile.read(limit if limit else None) connection.close = True else: - connection.close = True content = "" return content |