Don't pass through connection: keep-alive
This commit is contained in:
parent
8cbaa722b1
commit
e854fb1ad3
|
@ -227,10 +227,10 @@ def proxy(sock, host):
|
|||
del username
|
||||
del password
|
||||
|
||||
# Remove headers that don't need forwarding
|
||||
headers = dict((key, value) for key, value in headers.items() if not key.startswith(b'proxy-'))
|
||||
# Remove headers that don't need forwarding or are overwritten
|
||||
headers = dict((key, value) for key, value in headers.items() if not key.startswith(b'proxy-') and not key in (b'connection', b'keep-alive'))
|
||||
|
||||
# TODO: connection: close
|
||||
headers[b'connection'] = b' close'
|
||||
|
||||
# Split url into its constituents
|
||||
fields = url.split(b'://', 1)
|
||||
|
|
Loading…
Reference in New Issue