-
Notifications
You must be signed in to change notification settings - Fork 321
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
Auto-deflate injects Content-Encoding even wihtout body #521
Comments
/cc @Bonias |
Another problem I encounter, which worth keeping in mind that some servers may respond with (!) 400 error when there's body and no content-length header, which is not present when auto-deflate is in use. |
Fixes httprb#521 Also move auto-deflate related code from `http/client.rb` to `http/features/auto_deflate.rb` which seems to be move appropriate place.
Fixes httprb#521 Also move auto-deflate related code from `http/client.rb` to `http/features/auto_deflate.rb` which seems to be move appropriate place.
Fixes httprb#521 Also move auto-deflate related code from `http/client.rb` to `http/features/auto_deflate.rb` which seems to be move appropriate place.
Fixed in #529
Can you provide an example? Content-Length is set when auto-deflate is in use: HTTP.use(logging: { logger: Logger.new(STDOUT) }).
use(:auto_deflate).
post("http://localhost:3000", body: 'xxx') Here is what is logged by logger:
and here is what is actually sent:
|
Thank for the fix. About Content-Length with body, indeed, I have overlooked that it's simply not being logged, so my problem was surely related to something else. Thanks again for looking into this. |
Fixes #521 Also move auto-deflate related code from `http/client.rb` to `http/features/auto_deflate.rb` which seems to be move appropriate place.
Fixes #521 Also move auto-deflate related code from `http/client.rb` to `http/features/auto_deflate.rb` which seems to be move appropriate place.
Example:
The above will send request:
Content-Encoding is being sent as
gzip
, while there's no content at all. That makes some servers go nuts. E.g. I've seen 403 responses, whileexample.com
responds with400
(which I believe is correct response if it needs to be failed)The text was updated successfully, but these errors were encountered: