summaryrefslogtreecommitdiff
path: root/lib/net/http/generic_request.rb
diff options
context:
space:
mode:
authorShohei Maeda <[email protected]>2021-06-06 18:49:51 +0900
committergit <[email protected]>2021-11-11 17:34:00 +0900
commit52ab9bbee918c63faad32e3851b162691b984d40 ()
treecf786a84ef773afbbc07f646292d37c4fe3b6b57 /lib/net/http/generic_request.rb
parent33533fabd54e23bced64a74114ee7786478a6ee7 (diff)
[ruby/net-http] Send Accept-Encoding header on HEAD method
https://.com/ruby/net-http/commit/9d95c5e3e6
-rw-r--r--lib/net/http/generic_request.rb4
1 files changed, 2 insertions, 2 deletions
@@ -31,12 +31,12 @@ class Net::HTTPGenericRequest
@decode_content = false
- if @response_has_body and Net::HTTP::HAVE_ZLIB then
if !initheader ||
!initheader.keys.any? { |k|
%w[accept-encoding range].include? k.downcase
} then
- @decode_content = true
initheader = initheader ? initheader.dup : {}
initheader["accept-encoding"] =
"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"