Method: Protocol::Rack::Rewindable#call

Defined in:
lib/protocol/rack/rewindable.rb

#call(request) ⇒ Object

Wrap the request body in a rewindable buffer if required.



70
71
72
73
74
75
76
# File 'lib/protocol/rack/rewindable.rb', line 70

def call(request)
	if body = request.body and needs_rewind?(request)
		request.body = Protocol::HTTP::Body::Rewindable.new(body)
	end
	
	return super
end