[前][次][番号順一覧][スレッド一覧]

ruby-changes:38982

From: naruse <ko1@a...>
Date: Mon, 29 Jun 2015 19:04:52 +0900 (JST)
Subject: [ruby-changes:38982] naruse:r51063 (trunk): fix previous commit for nil case

naruse	2015-06-29 19:04:33 +0900 (Mon, 29 Jun 2015)

  New Revision: 51063

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51063

  Log:
    fix previous commit for nil case

  Modified files:
    trunk/lib/net/http/response.rb
Index: lib/net/http/response.rb
===================================================================
--- lib/net/http/response.rb	(revision 51062)
+++ lib/net/http/response.rb	(revision 51063)
@@ -250,7 +250,8 @@ class Net::HTTPResponse https://github.com/ruby/ruby/blob/trunk/lib/net/http/response.rb#L250
     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'
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]