visionmedia/express — pull request #1868 by dpatti (2014-01-02 18:13:56+00:00)
Title: Automatic OPTIONS response breaks with multiple routers

We ran into a situation where a middleware from a node module was creating its own express router instance and inserting it as middleware. This was causing the automatic options to break since the flow never fell back to our main router. I don't know what your views on supporting applications that use multiple routers are.

It would be very easy to fix by passing `next` to `_options`, and then calling it if the response from `_optionsFor` is empty. This would also have the added benefit of returning 404 errors for `OPTIONS` requests to routes that don't exist, which I believe is standard practice.

However, the downside of this is that if you have multiple verbs for a single route spread over two routers, it won't return all the available verbs. So it may not be a complete fix, depending on how you view it. If you like the fix, I can submit a pull request (though it is only 4 lines).