From 9cf11b70ca2a271bcfd737d9fc580dd9fdfad20f Mon Sep 17 00:00:00 2001 From: ktsj Date: Sat, 1 Aug 2015 08:23:32 +0000 Subject: * lib/net/http/response.rb (Net::HTTPResponse::Inflater#finish): fix a bug that empty gzipped response body causes Zlib::BufError. [ruby-core:68846] [Bug #11058] * test/net/http/test_httpresponse.rb: tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http/response.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index 253c5cbe98..126c22160d 100644 --- a/lib/net/http/response.rb +++ b/lib/net/http/response.rb @@ -359,6 +359,7 @@ class Net::HTTPResponse # Finishes the inflate stream. def finish + return if @inflate.total_in == 0 @inflate.finish end -- cgit v1.2.3