1. 14 7月, 2016 1 次提交
    • G
      Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static · 25c14617
      Grey Baker 提交于
      The `ActionDispatch::Static` middleware is used low down in the stack to serve
      static assets before doing much processing. Since it's called from so low in
      the stack, we don't have access to the request ID at this point, and generally
      won't have any exception handling defined (by default `ShowExceptions` is added
      to the stack quite a bit higher and relies on logging and request ID).
      
      Before https://github.com/rails/rails/commit/8f27d6036a2ddc3cb7a7ad98afa2666ec163c2c3
      this middleware would ignore unknown HTTP methods, and an exception about these
      would be raised higher in the stack. After that commit, however, that exception
      will be raised here.
      
      If we want to keep `ActionDispatch::Static` so low in the stack (I think we do)
      we should suppress the `ActionController::UnknownHttpMethod` exception here,
      and instead let it be raised higher up the stack, once we've had a chance to
      define exception handling behaviour.
      
      This PR updates `ActionDispatch::Static` so it passes `Rack::Request` objects to
      `ActionDispatch::FileHandler`, which won't raise an
      `ActionController::UnknownHttpMethod` error. If an unknown method is
      passed, it should exception higher in the stack instead, once we've had a
      chance to define exception handling behaviour.`
      25c14617
  2. 13 7月, 2016 7 次提交
  3. 12 7月, 2016 16 次提交
  4. 11 7月, 2016 8 次提交
  5. 10 7月, 2016 5 次提交
  6. 09 7月, 2016 3 次提交