lib/hanami/middleware/body_parser.rb in hanami-router-2.0.0 vs lib/hanami/middleware/body_parser.rb in hanami-router-2.0.1
- old
+ new
@@ -43,10 +43,10 @@
return @app.call(env) if body.empty?
env[RACK_INPUT].rewind # somebody might try to read this stream
if (parser = @parsers[media_type(env)])
- env[Router::ROUTER_PARSED_BODY] = parser.parse(body)
+ env[Router::ROUTER_PARSED_BODY] = parser.parse(body, env)
env[ROUTER_PARAMS] = _symbolize(env[Router::ROUTER_PARSED_BODY])
end
@app.call(env)
end