bugfix: do not reset content-length for compressed body if the body is streamable (not only chunked)

This commit is contained in:
HoneyryderChuck 2021-04-30 18:49:09 +01:00
parent 7a60346bf7
commit b73882210f

View File

@ -66,7 +66,7 @@ module HTTPX
@body = Encoder.new(@body, options.encodings.registry(encoding).deflater)
end
@headers["content-length"] = @body.bytesize unless chunked?
@headers["content-length"] = @body.bytesize unless unbounded_body?
end
end