From 5da448fd38a92d0bffe221c054662fbb6f262b58 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 28 Mar 2018 16:44:33 +0000 Subject: revert r62985 (r62966 in trunk) It breaks test-all git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@63025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/httprequest.rb | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'lib/webrick/httprequest.rb') diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index 69345e44a5..b40bcb0d57 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -257,31 +257,6 @@ module WEBrick @body.empty? ? nil : @body end - ## - # Prepares the HTTPRequest object for use as the - # source for IO.copy_stream - - def body_reader - @body_tmp = [] - @body_rd = Fiber.new do - body do |buf| - @body_tmp << buf - Fiber.yield - end - end - @body_rd.resume # grab the first chunk and yield - self - end - - # for IO.copy_stream - def readpartial(size, buf = ''.b) # :nodoc - res = @body_tmp.shift or raise EOFError, 'end of file reached' - buf.replace(res) - res.clear - @body_rd.resume # get more chunks - buf - end - ## # Request query as a Hash -- cgit v1.2.3