mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
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
This commit is contained in:
parent
e49c2e3569
commit
3b90cf70d1
4 changed files with 42 additions and 2 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue