Senthil Kumaran <orsent...@gmail.com> added the comment: 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. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1368312> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com