-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Urllib2 authentication memory. #51408
Comments
For each request requiring HTTP authentication, urllib2 submits the This is compliant behavior. The problem comes in that urllib2 repeats At times this is just an inefficiency--every request gets sent twice, Sometimes, especially with large POST bodies, this causes a connection (Mercurial suffers greatly from this (and I have suggested workaround to This isn't non-compliant behavior, but RFC2617 (sections 2, 3.3) More analysis and fix suggestions at |
@senthil what is your opinion of this? |
Adding a patch for Python 3+ Some notes:
I'm using the same logic for adding keys for adding authenticated urls/realm as for login credentials in basic auth handler. |
Added some review comments. I think the urllib documentation does not really explain how to *use* these classes, and it should, but that is a separate issue. |
Updated patch with review changes |
Here is the doc patch for the design that Akshit and I agreed to after re-consideration of the API. This eliminates the HTTPBasicPriorAuthHandler in favor of the HTTPPasswdMgrWithPriorAuth password manager and putting support for prior auth on the AbstractBasicAuthHandler based on whether or not the password_mgr supports the is_authenticated and updated_authenticated methods. This redesign means that the Proxy handler automatically gets support for prior auth. |
Actually attaching the patch this time. |
Updated code as per docs |
New changeset 1b9e81cb83bc by R David Murray in branch 'default': |
Should this be closed? A substantial patch was pushed year ago and I see no indication of further issue. |
Yes, Go ahead. Thanks. On Tue, May 24, 2016 at 1:56 AM, Terry J. Reedy <report@bugs.python.org>
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: