From 7604ca41ff70617a605a7aabb09b128ae47ae22d Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 29 Jun 2015 10:04:33 +0000 Subject: [PATCH] fix previous commit for nil case git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http/response.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index 219e14e777..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'].downcase + v = self['content-encoding'] + case v && v.downcase when 'deflate', 'gzip', 'x-gzip' then self.delete 'content-encoding'