codegangsta/martini — pull request #144 by jeyb (2014-01-02 07:16:36+00:00)
Title: Fixes regression introduced by codegangsta/martini/pull/143

Hey @codegangsta, looks like I didn't test my earlier PR well enough. Caught a few mistakes. Explanation below with fixes. You can either revert that from master to test more throughly, or pull in this fix. Sorry about that.

https://github.com/codegangsta/martini/pull/143.

1. The check for non-GET requests should occur after checking the static
file is present. Otherwise, we are returning 404 for all non-GET
requests.

2. We shouldn't set the status code to 404, as the router could override
the behavior. GET localhost:3000 could serve index.html while POST
localhost:3000 could respond with some custom response. If we returned
404, you would not be able to override such behavior.

3. The router will handle returning 404 when there is no such override
defined. Updated the test to use the router so it does.