Skip to content

Add support for gzip, deflate, and brotli decoding - #2

Merged
lovelydinosaur merged 1 commit into
masterfrom
decompression
Apr 16, 2019
Merged

lovelydinosaur merged 1 commit into
masterfrom
decompression

Conversation

@lovelydinosaur

Copy link
Copy Markdown
Member

No description provided.

@lovelydinosaur
lovelydinosaur merged commit 60befed into master Apr 16, 2019
@lovelydinosaur
lovelydinosaur deleted the decompression branch April 16, 2019 10:36
blitzy Bot referenced this pull request in blitzy-research/httpx Jul 16, 2026
…RITICAL QA findings)

Two client store-preservation paths flattened a CookieStore into the legacy
Cookies/CookieJar machinery, which cannot ingest a CookieStore and crashed with
"AttributeError: 'str' object has no attribute 'domain'".

Finding #1 (_merge_cookies): per-request cookies=CookieStore on a legacy-Cookies
client crashed (or silently flattened). The merge now targets a CookieStore when
EITHER the client store or the per-request argument is a CookieStore, preserving
its deterministic RFC 6265/6265bis semantics.

Finding #2 (_build_redirect_request): a CookieStore-backed Client/AsyncClient
crashed on any redirect once the store held a cookie. The redirect now preserves
the CookieStore instance instead of wrapping it in Cookies(...), mirroring the
__init__/setter/merge preservation pattern.

Both fixes are confined to httpx/_client.py; the Cookies class, _models.py, and
_cookiestore.py are unchanged (strict additivity / backward compatibility).

Adds regression tests in tests/client/test_cookies.py covering per-request
CookieStore on a legacy client, client+per-request merge, CookieStore-backed
redirect (sync + async), and host-only no-leak across a cross-host redirect.
httpx/_client.py returns to 100% line coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant