diff options
author | Grey Baker <greysteil@gmail.com> | 2016-07-12 12:34:21 +0100 |
---|---|---|
committer | Grey Baker <greysteil@gmail.com> | 2016-07-13 17:52:36 +0100 |
commit | 25c1461766745259d1d5be10fdcddc6e56d24f22 (patch) | |
tree | 9e550e981c9963cb902f3be090f0346d84d03f92 /actioncable/test/javascript/vendor/mock-socket.js | |
parent | 3b55ac22c920c366080fe3b56c9c3a3728f69f57 (diff) | |
download | rails-25c1461766745259d1d5be10fdcddc6e56d24f22.tar.gz rails-25c1461766745259d1d5be10fdcddc6e56d24f22.tar.bz2 rails-25c1461766745259d1d5be10fdcddc6e56d24f22.zip |
Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
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.`
Diffstat (limited to 'actioncable/test/javascript/vendor/mock-socket.js')
0 files changed, 0 insertions, 0 deletions