This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients bboals, jjlee, orsenthil, zathras
Date 2009-11-15.06:08:00
SpamBayes Score 0.00047018766
Marked as misclassified No
Message-id <1258265284.88.0.475199186807.issue1368312@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is Invalid. I am sorry that it had be open for so long
without any explanation. 

The order in which the handlers are tried does not depend upon the way
http_error_auth_reqed method is coded, but rather on the handler_order.
In urllib2, we have handler_order set to 490 for digest and 500 for
basic, which means that Digest will always be tried before Basic
(Correctly so).  If you have any server implementing both Basic and
Digest (well,it is bad idea on the server part), you can try with any
client, like firefox and see that Digest overrules Basic.

Now, if you have two files (one under Basic Authentication ) and another
under Digest Authentication configured, then it all boils down to adding
"both" HTTPBasicAuthHandler and HTTPDigestAuthHandler to your
OpenerDirector instance. The handler_order and opener instance will
properly take care of opening the individual distinct requests with
appropriate handlers.
I tested it with the setup here and could not see any problem.  I am
closing this bug as Invalid.
History
Date User Action Args
2009-11-15 06:08:05orsenthilsetrecipients: + orsenthil, jjlee, bboals, zathras
2009-11-15 06:08:04orsenthilsetmessageid: <1258265284.88.0.475199186807.issue1368312@psf.upfronthosting.co.za>
2009-11-15 06:08:03orsenthillinkissue1368312 messages
2009-11-15 06:08:01orsenthilcreate