Permalink
Browse files

Allow EOFError exception from request parser to continue up the stack.

  • Loading branch information...
hexfet
hexfet committed Nov 18, 2012
1 parent 1824547 commit da5179fe59d06e7ac064540a89afae4e5bca1d81
Showing with 4 additions and 3 deletions.
  1. +0 −2 lib/rack/methodoverride.rb
  2. +4 −1 test/spec_methodoverride.rb
@@ -26,8 +26,6 @@ def method_override(env)
method = req.POST[METHOD_OVERRIDE_PARAM_KEY] ||
env[HTTP_METHOD_OVERRIDE_HEADER]
method.to_s.upcase
- rescue EOFError
- ""
end
end
end
@@ -65,7 +65,10 @@ def app
"CONTENT_TYPE" => "multipart/form-data, boundary=AaB03x",
"CONTENT_LENGTH" => input.size.to_s,
:method => "POST", :input => input)
- app.call env
+ begin
+ app.call env
+ rescue EOFError
+ end
env["REQUEST_METHOD"].should.equal "POST"
end

0 comments on commit da5179f

Please sign in to comment.