diff options
Diffstat (limited to 'lib/webrick/httprequest.rb')
-rw-r--r-- | lib/webrick/httprequest.rb | 25 |
1 files changed, 0 insertions, 25 deletions
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 @@ -258,31 +258,6 @@ module WEBrick 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 def query |