|
|
@ -825,9 +825,11 @@ def open_url(url, data=None, headers=None, method=None, use_proxy=True,
|
|
|
|
# use this username/password combination for urls
|
|
|
|
# use this username/password combination for urls
|
|
|
|
# for which `theurl` is a super-url
|
|
|
|
# for which `theurl` is a super-url
|
|
|
|
authhandler = urllib_request.HTTPBasicAuthHandler(passman)
|
|
|
|
authhandler = urllib_request.HTTPBasicAuthHandler(passman)
|
|
|
|
|
|
|
|
digest_authhandler = urllib_request.HTTPDigestAuthHandler(passman)
|
|
|
|
|
|
|
|
|
|
|
|
# create the AuthHandler
|
|
|
|
# create the AuthHandler
|
|
|
|
handlers.append(authhandler)
|
|
|
|
handlers.append(authhandler)
|
|
|
|
|
|
|
|
handlers.append(digest_authhandler)
|
|
|
|
|
|
|
|
|
|
|
|
elif username and force_basic_auth:
|
|
|
|
elif username and force_basic_auth:
|
|
|
|
headers["Authorization"] = basic_auth_header(username, password)
|
|
|
|
headers["Authorization"] = basic_auth_header(username, password)
|
|
|
|