class Protocol::Rack::Rewindable

def call(request)

@returns [Protocol::HTTP::Response] The response from the wrapped middleware.
@parameter request [Protocol::HTTP::Request] The request to process.

If the request needs a rewindable body, wraps it in a {Protocol::HTTP::Body::Rewindable}.
Wrap the request body in a rewindable buffer if required.
def call(request)
	if body = request.body and needs_rewind?(request)
		request.body = Protocol::HTTP::Body::Rewindable.new(body)
	end
	
	return super
end