summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-03-01 12:59:21 -0800
committergit <svn-admin@ruby-lang.org>2022-04-20 10:22:06 +0900
commit90ccc5674affb64036ca86f566c8650f654fc0f6 (patch)
tree0d18cee05d0ba91778b48dc818b6477b076eb6c2 /spec
parentfada4d24f9acd98f1e289913f6eea584d281fb42 (diff)
[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] https://github.com/ruby/net-http/commit/4d47e34995
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions