Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/net/http/generic_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def initialize(m, reqbody, resbody, uri_or_path, initheader = nil)

@decode_content = false

if @response_has_body and Net::HTTP::HAVE_ZLIB then
if Net::HTTP::HAVE_ZLIB then
if !initheader ||
!initheader.keys.any? { |k|
%w[accept-encoding range].include? k.downcase
} then
@decode_content = true
@decode_content = true if @response_has_body
initheader = initheader ? initheader.dup : {}
initheader["accept-encoding"] =
"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
Expand Down