MCPcopy Index your code
hub / github.com/python/cpython / retry_http_digest_auth

Method retry_http_digest_auth

Lib/urllib/request.py:1095–1105  ·  view source on GitHub ↗
(self, req, auth)

Source from the content-addressed store, hash-verified

1093 " the following scheme: '%s'" % scheme)
1094
1095 def retry_http_digest_auth(self, req, auth):
1096 token, challenge = auth.split(' ', 1)
1097 chal = parse_keqv_list(filter(None, parse_http_list(challenge)))
1098 auth = self.get_authorization(req, chal)
1099 if auth:
1100 auth_val = 'Digest %s' % auth
1101 if req.headers.get(self.auth_header, None) == auth_val:
1102 return None
1103 req.add_unredirected_header(self.auth_header, auth_val)
1104 resp = self.parent.open(req, timeout=req.timeout)
1105 return resp
1106
1107 def get_cnonce(self, nonce):
1108 # The cnonce-value is an opaque

Callers 1

http_error_auth_reqedMethod · 0.95

Calls 8

get_authorizationMethod · 0.95
parse_keqv_listFunction · 0.85
parse_http_listFunction · 0.85
filterFunction · 0.50
splitMethod · 0.45
getMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected