This commit is contained in:
parent
422857166b
commit
cdb35f4ce2
2 changed files with 9 additions and 0 deletions
|
@ -825,9 +825,11 @@ def open_url(url, data=None, headers=None, method=None, use_proxy=True,
|
|||
# use this username/password combination for urls
|
||||
# for which `theurl` is a super-url
|
||||
authhandler = urllib_request.HTTPBasicAuthHandler(passman)
|
||||
digest_authhandler = urllib_request.HTTPDigestAuthHandler(passman)
|
||||
|
||||
# create the AuthHandler
|
||||
handlers.append(authhandler)
|
||||
handlers.append(digest_authhandler)
|
||||
|
||||
elif username and force_basic_auth:
|
||||
headers["Authorization"] = basic_auth_header(username, password)
|
||||
|
|
|
@ -175,6 +175,13 @@
|
|||
user: user
|
||||
password: passwd
|
||||
|
||||
- name: test digest auth
|
||||
uri:
|
||||
url: 'http://{{ httpbin_host }}/digest-auth/auth/user/passwd'
|
||||
user: user
|
||||
password: passwd
|
||||
HEADER_Cookie: "fake=fake_value"
|
||||
|
||||
- name: test PUT
|
||||
uri:
|
||||
url: 'http://{{ httpbin_host }}/put'
|
||||
|
|
Loading…
Reference in a new issue