class Rackup::Handler::WEBrick::Input

This handles mapping the WEBrick request to a Rack input stream.

def close

def close
  @request = nil
  @reader = nil
end

def initialize(request)

def initialize(request)
  @request = request
  @reader = Fiber.new do
    @request.body do |chunk|
      Fiber.yield(chunk)
    end
    Fiber.yield(nil)
    # End of stream:
    @reader = nil
  end
end

def read_next

Read one chunk from the request body.
def read_next
  @reader&.resume
end