From cdff79fd4c03f644c25373bf0d15ef30e3644180 Mon Sep 17 00:00:00 2001 From: Doug Lethin Date: Fri, 15 May 2015 22:20:09 -0400 Subject: [PATCH] Make sure proxy returns the httpversion specified in the request rather than hardcoding to 1.1. --- libmproxy/protocol/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 8d703786b..2bfc313c1 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'