-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default "not found" route. #18
Comments
I agree. Either a default route, or return |
This could lead to a lot of Default routes to different error codes, could't it?! |
Yep, I could think of 404 (for no matches on the router), 405 (which @ramsey mentioned in another issue), 406 for routes that do exist but doesn't map to any of the supported mime types declared in the Accept routine, 500 (for every PHP error or exception uncaught) and 505 (for crazy unsupported HTTP version headers). Routines should be aware of this, so when Cache or Auth routines get implemented we could respond 401, 304 and similar status codes right from them. Currently, if I'm not mistaken, Respect doesn't use any header() calls yet. |
Also, we could support the OPTIONS method transparently (with the possibility to override it with a custom route) that responds with route information for specific routes or "*". I like a lot where this is going =D |
As well as the HEAD method, which would just return the exact headers returned on a GET request, without the response body. |
I believe the Router should have a default route for not found routes.
The text was updated successfully, but these errors were encountered: