lib/rambulance/exceptions_app.rb in rambulance-0.4.0 vs lib/rambulance/exceptions_app.rb in rambulance-0.5.0
- old
+ new
@@ -58,9 +58,15 @@
request.GET
rescue BAD_REQUEST_EXCEPTION
request.env["MALFORMED_QUERY_STRING"], request.env["QUERY_STRING"] = request.env["QUERY_STRING"], ""
end
+ begin
+ request.POST
+ rescue BAD_REQUEST_EXCEPTION, ArgumentError
+ request.env["MALFORMED_BODY"], request.env["rack.input"] = request.env["rack.input"], StringIO.new
+ end
+
super
end
def send_action(name, *args)
@_status = request.env["PATH_INFO"][1..-1].to_i