1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/net/http
normal cbedbaf9d9 lib/net/protocol.rb: account read_bytes before caller sees it
Users may modify the chunk yielded to them in Net::HTTPResponse#read_body.
This will allow users to reduce memory usage by calling
String#clear on the buffer once they're done using it.

* lib/net/protocol.rb (read): increment read_bytes earlier
  (read_all): ditto
* test/net/http/test_httpresponse.rb (test_read_body_block_mod): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-22 07:36:00 +00:00
..
test_buffered_io.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
test_http.rb Clean proxy 2017-05-20 15:58:16 +00:00
test_http_request.rb test: use assert_not_* 2016-02-19 07:45:58 +00:00
test_httpheader.rb * lib/net/http/header.rb (Net::HTTPHeader#{each_header,each_name, 2016-05-04 09:46:46 +00:00
test_httpresponse.rb lib/net/protocol.rb: account read_bytes before caller sees it 2017-05-22 07:36:00 +00:00
test_httpresponses.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
test_https.rb net/http: don't use OpenSSL::TestUtils from test code 2016-11-29 15:48:45 +00:00
test_https_proxy.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
utils.rb net/http: don't use OpenSSL::TestUtils from test code 2016-11-29 15:48:45 +00:00