aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-10 10:46:22 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-10 10:46:22 +1200
commit55ddf853cd8cac13bb6021ef92d21af85cb9b2f1 (patch)
treeb1c15c915076c80a27eaa97d3027c4a13c9fbeb8 /libmproxy/proxy.py
parenta3b47e0cb59205fd2512e96ae9058e371c8a5760 (diff)
downloadmitmproxy-55ddf853cd8cac13bb6021ef92d21af85cb9b2f1.tar.gz
mitmproxy-55ddf853cd8cac13bb6021ef92d21af85cb9b2f1.tar.bz2
mitmproxy-55ddf853cd8cac13bb6021ef92d21af85cb9b2f1.zip
Add HTTP version to flow.Request
This is a serialization format change, that makes us incompatible with previous versions.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 4eeb17c9..c7e5d972 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -465,7 +465,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
method, path, httpversion = parse_init_http(line)
headers = read_headers(self.rfile)
content = self.read_contents(client_conn, headers, httpversion)
- return flow.Request(client_conn, host, port, "http", method, path, headers, content)
+ return flow.Request(client_conn, httpversion, host, port, "http", method, path, headers, content)
elif line.startswith("CONNECT"):
host, port, httpversion = parse_init_connect(line)
# FIXME: Discard additional headers sent to the proxy. Should I expose
@@ -486,12 +486,12 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
method, path, httpversion = parse_init_http(self.rfile.readline(line))
headers = read_headers(self.rfile)
content = self.read_contents(client_conn, headers, httpversion)
- return flow.Request(client_conn, host, port, "https", method, path, headers, content)
+ return flow.Request(client_conn, httpversion, host, port, "https", method, path, headers, content)
else:
method, scheme, host, port, path, httpversion = parse_init_proxy(line)
headers = read_headers(self.rfile)
content = self.read_contents(client_conn, headers, httpversion)
- return flow.Request(client_conn, host, port, scheme, method, path, headers, content)
+ return flow.Request(client_conn, httpversion, host, port, scheme, method, path, headers, content)
def send_response(self, response):
d = response._assemble()