aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
authorDoug Lethin <dlethin@gmail.com>2015-05-15 22:20:09 -0400
committerDoug Lethin <dlethin@gmail.com>2015-05-15 22:20:09 -0400
commitcdff79fd4c03f644c25373bf0d15ef30e3644180 (patch)
tree88753cca36672f39cd6b7d32e26d3dfd016614b9 /libmproxy/protocol
parent1c26516b1822d82e3b701539591a1d22831e0a19 (diff)
downloadmitmproxy-cdff79fd4c03f644c25373bf0d15ef30e3644180.tar.gz
mitmproxy-cdff79fd4c03f644c25373bf0d15ef30e3644180.tar.bz2
mitmproxy-cdff79fd4c03f644c25373bf0d15ef30e3644180.zip
Make sure proxy returns the httpversion specified in the request rather
than hardcoding to 1.1.
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 8d703786..2bfc313c 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -1248,7 +1248,8 @@ class HTTPHandler(ProtocolHandler):
flow.server_conn = self.c.server_conn
self.c.establish_server_connection()
self.c.client_conn.send(
- 'HTTP/1.1 200 Connection established\r\n' +
+ ('HTTP/%s.%s 200 ' % (request.httpversion[0],request.httpversion[1])) +
+ 'Connection established\r\n' +
'Content-Length: 0\r\n' +
('Proxy-agent: %s\r\n' % self.c.config.server_version) +
'\r\n'