Skip to content
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

Closed
alganet opened this issue Feb 18, 2012 · 6 comments
Closed

Default "not found" route. #18

alganet opened this issue Feb 18, 2012 · 6 comments
Labels

Comments

@alganet
Copy link
Member

alganet commented Feb 18, 2012

I believe the Router should have a default route for not found routes.

@ramsey
Copy link
Contributor

ramsey commented Mar 9, 2012

I agree. Either a default route, or return 404 Not Found by default, or do both.

@augustohp
Copy link
Member

This could lead to a lot of Default routes to different error codes, could't it?!

@alganet
Copy link
Member Author

alganet commented Mar 9, 2012

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.

@alganet
Copy link
Member Author

alganet commented Mar 9, 2012

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

@ramsey
Copy link
Contributor

ramsey commented Mar 9, 2012

As well as the HEAD method, which would just return the exact headers returned on a GET request, without the response body.

augustohp pushed a commit that referenced this issue Mar 11, 2012
@augustohp augustohp mentioned this issue Mar 11, 2012
3 tasks
@augustohp
Copy link
Member

As seen in the commit above, it fixes this issue, but as in #25 we should implement some api to do header manipulation as seen on #28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants