diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-03 19:46:34 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-03 19:46:34 +0000 |
commit | 6811973d1355ba40ee4b3fc5a43ed65b67aac9b7 (patch) | |
tree | 140225fc666edb6f7f29a941bc59b6bbde7733c1 /lib | |
parent | 7af73882028f65c96015a1c8801b40565f9c0119 (diff) | |
download | ruby-6811973d1355ba40ee4b3fc5a43ed65b67aac9b7.tar.gz |
* lib/net/http/response.rb (Net::HTTP.each_response_header):
raise first exception even if inflate_body_io.finish raises error.
when begin block raises error, finish usually raises error too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http/response.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index da3e4b4c8c..33a7804cdc 100644 --- a/lib/net/http/response.rb +++ b/lib/net/http/response.rb @@ -259,7 +259,12 @@ class Net::HTTPResponse begin yield inflate_body_io ensure - inflate_body_io.finish + e = $! + begin + inflate_body_io.finish + rescue + raise e + end end when 'none', 'identity' then self.delete 'content-encoding' |