MCPcopy
hub / github.com/encode/httpx / _resolve_qop

Method _resolve_qop

httpx/_auth.py:329–340  ·  view source on GitHub ↗
(self, qop: bytes | None, request: Request)

Source from the content-addressed store, hash-verified

327 return header_value
328
329 def _resolve_qop(self, qop: bytes | None, request: Request) -> bytes | None:
330 if qop is None:
331 return None
332 qops = re.split(b", ?", qop)
333 if b"auth" in qops:
334 return b"auth"
335
336 if qops == [b"auth-int"]:
337 raise NotImplementedError("Digest auth-int support is not yet implemented")
338
339 message = f'Unexpected qop value "{qop!r}" in digest auth'
340 raise ProtocolError(message, request=request)
341
342
343class _DigestAuthChallenge(typing.NamedTuple):

Callers 1

_build_auth_headerMethod · 0.95

Calls 1

ProtocolErrorClass · 0.85

Tested by

no test coverage detected