From 4db2abc01ce44911a473731ac7ea3a5b56f3324d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 24 Jun 2012 21:49:59 +1200 Subject: [PATCH] read_headers now returns an ODictCaseless object. --- libmproxy/proxy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 56642192b..0fe203f14 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -108,7 +108,7 @@ class ServerConnection(tcp.TCPClient): code = int(code) except ValueError: raise ProxyError(502, "Invalid server response: %s."%line) - headers = odict.ODictCaseless(http.read_headers(self.rfile)) + headers = http.read_headers(self.rfile) if code >= 100 and code <= 199: return self.read_response() if request.method == "HEAD" or code == 204 or code == 304: @@ -238,7 +238,7 @@ class ProxyHandler(tcp.BaseHandler): else: scheme = "http" method, path, httpversion = http.parse_init_http(line) - headers = odict.ODictCaseless(http.read_headers(self.rfile)) + headers = http.read_headers(self.rfile) content = http.read_http_body_request( self.rfile, self.wfile, headers, httpversion, self.config.body_size_limit ) @@ -246,7 +246,7 @@ class ProxyHandler(tcp.BaseHandler): elif self.config.reverse_proxy: scheme, host, port = self.config.reverse_proxy method, path, httpversion = http.parse_init_http(line) - headers = odict.ODictCaseless(http.read_headers(self.rfile)) + headers = http.read_headers(self.rfile) content = http.read_http_body_request( self.rfile, self.wfile, headers, httpversion, self.config.body_size_limit ) @@ -273,14 +273,14 @@ class ProxyHandler(tcp.BaseHandler): if self.proxy_connect_state: host, port, httpversion = self.proxy_connect_state method, path, httpversion = http.parse_init_http(line) - headers = odict.ODictCaseless(http.read_headers(self.rfile)) + headers = http.read_headers(self.rfile) content = http.read_http_body_request( self.rfile, self.wfile, headers, httpversion, self.config.body_size_limit ) return flow.Request(client_conn, httpversion, host, port, "https", method, path, headers, content) else: method, scheme, host, port, path, httpversion = http.parse_init_proxy(line) - headers = odict.ODictCaseless(http.read_headers(self.rfile)) + headers = http.read_headers(self.rfile) content = http.read_http_body_request( self.rfile, self.wfile, headers, httpversion, self.config.body_size_limit )