1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/net/http
Jeremy Evans 90ccc5674a [ruby/net-http] Add ignore_eof access to HTTP and HTTPResponse
The ignore_eof setting on HTTPResponse makes it so an EOFError is
raised when reading bodies with a defined Content-Length, if the
body read was truncated due to the socket be closed.

The ignore_eof setting on HTTP sets the values used in responses
that are created by the object.

For backwards compatibility, the default is for both settings is
true.  However, unless you are specifically tested for and handling
truncated responses, it's a good idea to set ignore_eof to false so
that errors are raised for truncated responses, instead of those
errors silently being ignored.

Fixes [Bug #14972]

4d47e34995
2022-04-20 10:22:06 +09:00
..
backward.rb [ruby/net-http] Warn deprecated old constants 2021-11-04 20:51:51 +09:00
exceptions.rb
generic_request.rb [ruby/net-http] Send Accept-Encoding header on HEAD method 2021-11-11 17:34:00 +09:00
header.rb Improve documentation for Net::HTTPHeader#set_form [ci skip] 2020-05-27 13:13:46 -07:00
net-http.gemspec Removed dependency of net-protocol. There is no plan to remove from stdlib 2022-02-21 17:10:56 +09:00
proxy_delta.rb
request.rb
requests.rb
response.rb [ruby/net-http] Add ignore_eof access to HTTP and HTTPResponse 2022-04-20 10:22:06 +09:00
responses.rb
status.rb