Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Support compression with Basic HTTP Client #2765

Open
henricook opened this issue Nov 5, 2024 · 3 comments
Open

[feature] Support compression with Basic HTTP Client #2765

henricook opened this issue Nov 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@henricook
Copy link

Version and OS
v0.47.03 on linux/docker

Is your feature request related to a problem? Please describe.
I had to poll this URL recently: https://www.revolve.com/never-fully-dressed-atlantis-cardigan-in-blue/dp/NEVR-WK3/?size=M&code=NEVR-WK3

I observed that it only works with curl if I have a Chrome user agent and --compressed

Describe the solution you'd like
I don't think that I can enable compression with the basic HTTP agent, which is why my polling is failing, although I don't have conclusive evidence of this just that the curl works and the cd.io poll fails. I'd be very happy to get further debug if you tell me what you'd like to see.

Describe the use-case and give concrete real-world examples
Attach any HTML/JSON, give links to sites, screenshots etc, we are not mind readers

Additional context
Add any other context or screenshots about the feature request here.

@henricook henricook added the enhancement New feature or request label Nov 5, 2024
@dgtlmoon
Copy link
Owner

dgtlmoon commented Nov 5, 2024

hmmm requests supports deflate so im wondering which exact compression algorithm it needs?

@dgtlmoon
Copy link
Owner

dgtlmoon commented Nov 5, 2024

$ curl "https://www.revolve.com/never-fully-dressed-atlantis-cardigan-in-blue/dp/NEVR-WK3/?size=M&code=NEVR-WK3"
curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
dgtlmoon@dgtlmoon-HP-ProBook-440-G7:~$ 

actually this is related to #2763 http-2 support

@henricook
Copy link
Author

< content-encoding: gzip

It'll work if you curl it like this:

curl --compressed -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" "https://www.revolve.com/never-fully-dressed-atlantis-cardigan-in-blue/dp/NEVR-WK3/?size=M&code=NEVR-WK3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants