failed WRONG_FIX UNSUBMITTED wrong_fix_unsubmitted(None) · None tool calls · 0 s · encode/httpx
(not found in data/tasks.jsonl)
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
* Respect the `http1` argument while configuring proxy transports. (#3023)
+* Fix RFC 2069 mode digest authentication. (#3045)
## 0.26.0 (20th December, 2023)
--- a/httpx/_auth.py
+++ b/httpx/_auth.py
@@ -280,17 +280,18 @@ class DigestAuth(Auth):
qop = self._resolve_qop(challenge.qop, request=request)
if qop is None:
+ # Following RFC 2069
digest_data = [HA1, challenge.nonce, HA2]
else:
- digest_data = [challenge.nonce, nc_value, cnonce, qop, HA2]
- key_digest = b":".join(digest_data)
+ # Following RFC 2617/7616
+ digest_data = [HA1, challenge.nonce, nc_value, cnonce, qop, HA2]
format_args = {
"username": self._username,
"realm": challenge.realm,
"nonce": challenge.nonce,
"uri": path,
- "response": digest(b":".join((HA1, key_digest))),
+ "response": digest(b":".join(digest_data)),
"algorithm": challenge.algorithm.encode(),
}
if challenge.opaque:
ImportError while loading conftest '/private/tmp/swe_work/mined_httpx_oracle2/httpx_3045/b/workspace/tests/conftest.py'.
tests/conftest.py:20: in <module>
import httpx
httpx/__init__.py:2: in <module>
from ._api import delete, get, head, options, patch, post, put, request, stream
httpx/_api.py:4: in <module>
from ._client import Client
httpx/_client.py:30: in <module>
from ._transports.default import AsyncHTTPTransport, HTTPTransport
httpx/_transports/default.py:30: in <module>
import httpcore
E ModuleNotFoundError: No module named 'httpcore'