Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/net/http/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ def inflater # :nodoc:
rescue => err
# Ignore #finish's error if there is an exception from yield
raise err if success
ensure
inflate_body_io.close
end
end
when 'none', 'identity' then
Expand Down Expand Up @@ -694,6 +696,13 @@ def finish
@inflate.finish
end

##
# Closes the inflate stream and releases its resources.

def close
@inflate.close
end

##
# The number of bytes inflated, used to update the Content-Length of
# the response.
Expand Down