Ignore incorrectnesses in traffic if they don't affect us.

This commit is contained in:
Aldo Cortesi 2012-06-09 21:45:22 +12:00
parent 9130cd63d3
commit 987f443b5d
1 changed files with 0 additions and 4 deletions

View File

@ -214,8 +214,6 @@ def parse_request_line(request):
major,minor = protocol.split('/')[1].split('.')
major = int(major)
minor = int(minor)
if major != 1:
raise ProxyError(400, "Unsupported protocol")
return method, scheme, host, port, path, minor
@ -459,8 +457,6 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
self.wfile.write('Proxy-agent: %s\r\n'%version.NAMEVERSION)
self.wfile.write('\r\n')
del headers['expect']
else:
raise ProxyError(417, 'Unmet expect: %s'%expect)
if httpminor == 0:
client_conn.close = True
if "connection" in headers: