summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-10 16:47:03 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-10 16:47:03 +0000
commit3b90cf70d17b5441a83b7ccb1aa0ff2e8b2f5bbc (patch)
tree3063aee1f11e9f6fd0b5d21e4cef278a1e780d52 /lib
parente49c2e3569ebf5a1304483efca4c92c143a3e321 (diff)
merge revision(s) 51061,51063,51091: [Backport #11285]
* lib/net/http/response.rb (inflater): CONTENT_ENCODING can be upper case. [ruby-core:69670] [Bug #11285] patched by Andy Chu * test/net/http/test_httpresponse.rb (HTTPResponseTest#test_read_body_content_encoding_deflate_uppercase): fix a failure without zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http/response.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index b0731694ca..674faf2cfc 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -250,7 +250,8 @@ class Net::HTTPResponse
return yield @socket unless @decode_content
return yield @socket if self['content-range']
- case self['content-encoding']
+ v = self['content-encoding']
+ case v && v.downcase
when 'deflate', 'gzip', 'x-gzip' then
self.delete 'content-encoding'