[Python-checkins] python/dist/src/Lib urllib2.py,1.51,1.52
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Thu, 10 Jul 2003 06:30:15 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv13349
Modified Files:
urllib2.py
Log Message:
Fix wrong header name. The framework looks for auth_header.
Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** urllib2.py 17 Jun 2003 21:52:34 -0000 1.51
--- urllib2.py 10 Jul 2003 13:30:12 -0000 1.52
***************
*** 423,431 ****
"""Return a Request or None in response to a redirect.
! This is called by the http_error_30x methods when a redirection
! response is received. If a redirection should take place, return a new
! Request to allow http_error_30x to perform the redirect. Otherwise,
! raise HTTPError if no-one else should try to handle this url. Return
! None if you can't but another Handler might.
"""
m = req.get_method()
--- 423,432 ----
"""Return a Request or None in response to a redirect.
! This is called by the http_error_30x methods when a
! redirection response is received. If a redirection should
! take place, return a new Request to allow http_error_30x to
! perform the redirect. Otherwise, raise HTTPError if no-one
! else should try to handle this url. Return None if you can't
! but another Handler might.
"""
m = req.get_method()
***************
*** 613,617 ****
def find_user_password(self, realm, authuri):
! user, password = HTTPPasswordMgr.find_user_password(self,realm,authuri)
if user is not None:
return user, password
--- 614,619 ----
def find_user_password(self, realm, authuri):
! user, password = HTTPPasswordMgr.find_user_password(self, realm,
! authuri)
if user is not None:
return user, password
***************
*** 768,772 ****
"""
! header = 'Authorization'
def http_error_401(self, req, fp, code, msg, headers):
--- 770,774 ----
"""
! auth_header = 'Authorization'
def http_error_401(self, req, fp, code, msg, headers):
***************
*** 777,781 ****
class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
! header = 'Proxy-Authorization'
def http_error_407(self, req, fp, code, msg, headers):
--- 779,783 ----
class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
! auth_header = 'Proxy-Authorization'
def http_error_407(self, req, fp, code, msg, headers):