-
Notifications
You must be signed in to change notification settings - Fork 123
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
The not found handler is returning 200 instead of 404 #137
Comments
I can work on a PR if that is indeed the correct location... |
@soapdog Which web server are you using? |
@felipedaragon local development with Xavante and deployment to Apache. |
duplicate #24 I never succeeded in making xavante do the appropriate code return. I can try again because it's been a while. The problem is specially when the dev wants to have custom 404 pages. Edit: still not successful |
It is happening on both Xavante and Apache. I will work out a PR. |
Oh yea, it should not be the case in apache! Thanks for the PR :) |
I am not sure but... Is the framework currently support custom 404 error page? I have tested to go on http://sailorproject.org/help and have got this text: /var/www/sailor_framework/src/sailor.lua:184: module 'controllers.help' not found: Not custom 404 error page. |
@superriva, try to debug some popular site custom 404 page, for example http://google.com/non-existing-page with Chrome developer tools, Network tab and you'll see |
Exactly @d9k. Status codes should be respected. You can have a custom 404 and return the correct code. I forgot to do this PR, argh. Will fix. |
When returning a 404 from a controller or even from Sailor itself, the status code is 200 and not 404 like it should be.
I believe the problem lies in https://github.com/sailorproject/sailor/blob/master/src/sailor.lua#L148, but I am not sure. A not found page should return 404 status...
The text was updated successfully, but these errors were encountered: