fix(gumroad, girlslife): force Accept-Encoding: identity#338
Conversation
62bbd8a to
22c5e80
Compare
|
@sturq Thank you for the heads up, you’re correct about this. Some modules can indeed break on different environments because of the advertised You can try this yourself: if a module is failing because of compressed responses, replace the current In general, using |
Both modules advertised "gzip, deflate, br, zstd" in Accept-Encoding, but httpx ships only gzip/deflate decoders out of the box. When the upstream server honored the header and replied with brotli or zstd, response bodies came back as raw compressed bytes, so the nonce regex in girlslife and response.json() in gumroad fell over with parse and exception errors. Switching to identity keeps the response uncompressed, no extra deps required. Confirmed locally with brotli/zstandard NOT installed (httpx decoders limited to identity, gzip, deflate): both modules return Registered / Not Registered cleanly.
22c5e80 to
7ac981c
Compare
|
Makes sense, agree on avoiding new deps. I've reset the branch and force-pushed a new commit that just switches gumroad and girlslife to |
Both modules advertised
Accept-Encoding: gzip, deflate, br, zstd, but httpx ships only gzip/deflate decoders by default. When servers honored the header and replied with brotli or zstd, the response body came back as raw compressed bytes, breaking the nonce regex in girlslife andresponse.json()in gumroad:Girlslife: Failed to parse responseGumroad: unexpected exception:Switching both to
Accept-Encoding: identitykeeps the response uncompressed, no extra deps required.Verified locally with brotli/zstandard NOT installed (httpx decoders limited to
identity, gzip, deflate): both modules returnRegistered/Not Registeredcleanly.Per your comment on the previous revision, scoped this to only the two confirmed-broken modules. Same pattern exists in a dozen other places (orchestrator, both
github.py, foxnews, ama, dribbble, linktree, producthunt, launchpad, battlenet, snapchat, threads), but those are currently working since their upstream servers are falling back to gzip. Happy to follow up with a separate PR if any of those start failing.