Make sure proxy returns the httpversion specified in the request rather

than hardcoding to 1.1.
This commit is contained in:
Doug Lethin 2015-05-15 22:20:09 -04:00
parent 1c26516b18
commit cdff79fd4c

View File

@ -1248,7 +1248,8 @@ class HTTPHandler(ProtocolHandler):
flow.server_conn = self.c.server_conn flow.server_conn = self.c.server_conn
self.c.establish_server_connection() self.c.establish_server_connection()
self.c.client_conn.send( 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' + 'Content-Length: 0\r\n' +
('Proxy-agent: %s\r\n' % self.c.config.server_version) + ('Proxy-agent: %s\r\n' % self.c.config.server_version) +
'\r\n' '\r\n'