diff --git a/README.md b/README.md index 191168c..fa4c2e8 100644 --- a/README.md +++ b/README.md @@ -199,11 +199,15 @@ cookie store (both expose a `requests`-style `session.cookies` with `set()` / `aioweb.ExtendedSession`, not just `_cookies_for_url()` (used by `preview()`). `resp.history` / `resp.redirect_chain` (`[(status, url), ...]`) and `resp.is_redirect` -are also threaded through on both backends: `CurlCffi.raw_request` maps curl_cffi's -`Response.history` (`list[dict]`) and `Noble.raw_request` maps noble_tls's -`list[Response]` into aioweb's `(status, url)` tuple shape, so `debug=True`'s "redirect -chain:" log line and any caller reading `resp.history` after a redirecting request see -the real hops on either backend, matching the base `aioweb.ExtendedSession` behavior. +are threaded through from whatever redirect history the backend exposes. **Caveat — the +CurlCffi backend has no per-hop history:** `curl_cffi` follows redirects internally in the +native curl layer and surfaces only the final URL/status, leaving `Response.history` an +empty list (it never populates it). So on `CurlCffi`, `resp.history`/`resp.redirect_chain` +are `[]` and `resp.is_redirect` reflects only the final response, even after a redirect — +this is a `curl_cffi` limitation, not a bug here, and it differs from the base aiohttp +`ExtendedSession` (which does record the hops). The `Noble` backend threads whatever +`noble_tls` exposes as its per-response history. If you need the redirect chain, use the +base backend or read the final URL. ## Honesty note @@ -221,14 +225,15 @@ are separate signals. Use this as one component, not a complete anti-bot solutio ### v0.1.7 -- **Both backends now thread redirect history.** `CurlCffi.raw_request` and - `Noble.raw_request` built their `Response` without `history=`, so - `resp.history`/`resp.redirect_chain`/`resp.is_redirect`-after-follow were - always empty and aioweb's own `debug=True` "redirect chain:" log line was - permanently dead on both TLS backends, despite the "inherits every aioweb - feature unchanged" claim. Each backend's native history (curl_cffi - `list[dict]`, noble_tls `list[Response]`) is now mapped into aioweb's - `(status, url)` tuple shape and passed through. +- **Backends thread whatever redirect history the client exposes.** `CurlCffi.raw_request` + and `Noble.raw_request` built their `Response` without `history=`, so + `resp.history`/`resp.redirect_chain`/`resp.is_redirect`-after-follow were always empty + and aioweb's own `debug=True` "redirect chain:" log line was dead on both TLS backends. + Each backend now maps its client's history into aioweb's `(status, url)` tuple shape. + **Caveat:** `curl_cffi` never populates `Response.history` (it follows redirects in the + native curl layer and surfaces only the final URL/status), so on the `CurlCffi` backend + `resp.history` is `[]` even after a redirect — a `curl_cffi` limitation, not addressable + here. `Noble` passes through whatever `noble_tls` records. ## Versioning