mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/net-http] Send Accept-Encoding header on HEAD method
https://github.com/ruby/net-http/commit/9d95c5e3e6
This commit is contained in:
parent
33533fabd5
commit
52ab9bbee9
1 changed files with 2 additions and 2 deletions
|
@ -31,12 +31,12 @@ class Net::HTTPGenericRequest
|
|||
|
||||
@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"
|
||||
|
|
Loading…
Add table
Reference in a new issue