-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete incoming connection headers, #85
Conversation
change rlist.clear() to del rlist[;] for python 2.7 compatability hide log of authorization header
don't merge yet. Seems it keeps connections open too long now. back to square one. |
…e is a body associated with some error responses...
…ing open connections in the next proxy.
ok, all done now. |
h_connection = self.headers["Connection"] | ||
del self.headers["Connection"] | ||
dprint("removed 'Connection'") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really required for do_CONNECT to work or can we limit the change to auth only?
I thought that I read that connection: headers were not relevant for CONNECT, so they should not be there. So decided belt and braces to delete one if found, and no point in storing it for later. |
rlist.clear() | ||
# rlist.clear() - stick with 2.7 compatible list operator. | ||
del rlist[:] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.clear() is not available in python 2.7(?) -> error.
del rlist[:] does the same according to google? - but I am no python guru :).
(I happened to have 2.x installed for other reasons; so saw the error. But soon installed 3.x for it's advantages. - but then had to reinstate 2.x for the 'other reasons' not working with 3.x -> now have both but need to swap between them.)
I have merged almost all your changes from this PR in 3bae3f8. Thank you for the fixes and please test and verify that it works as expected. |
yes, it works as well as my version for my uses - tested against WinGate (paa....). thankyou! |
Delete incoming connection headers,
change rlist.clear() to del rlist[;] for python 2.7 comparability
hide log of authorization header.
fixes #71 for me for NEGOCIATE and NTLM
please examine carefully, as I'm no python expert and no HTTP/Proxy expert.
Thankyou for a nice implementation - this is the only thing I found for this purpose :).