mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
7af7388202
commit
6811973d13
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Jul 4 04:39:52 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/net/http/response.rb (Net::HTTPResponse.each_response_header):
|
||||
raise first exception even if inflate_body_io.finish raises error.
|
||||
when begin block raises error, finish usually raises error too.
|
||||
|
||||
Fri Jul 4 02:56:04 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/generic.rb (URI::Generic#query=): remove validation, just
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue