diff options
Diffstat (limited to 'lib/rack/methodoverride.rb')
-rw-r--r-- | lib/rack/methodoverride.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rack/methodoverride.rb b/lib/rack/methodoverride.rb index 16bf23cf..61cb27fc 100644 --- a/lib/rack/methodoverride.rb +++ b/lib/rack/methodoverride.rb @@ -26,7 +26,11 @@ module Rack req = Request.new(env) method = method_override_param(req) || env[HTTP_METHOD_OVERRIDE_HEADER] - method.to_s.upcase + begin + method.to_s.upcase + rescue ArgumentError + env["rack.errors"].puts "Invalid string for method" + end end private |