https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412012-11-08T08:48:49Zlighty labsLighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=79622012-11-08T08:48:49Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Invalid</i></li><li><strong>Target version</strong> deleted (<del><i>1.4.32</i></del>)</li></ul><p>Just because it doesn't do what you want it to doesn't mean it is a bug; also changing such behavior in a stable branch would be bad.<br />The fact that the "bug" title contains a question mark indicates that you should have used the support forum instead.</p>
<p>that said: server.error-handler-404 was intended as a "rewrite-if-file-does-not-exist", so 200 is ok.<br />also we now recommend to use exactly this: <code>url.rewrite-if-not-file = (...)</code></p>
<p>server.errorfile-prefix is provided to change the html that is displayed for errors, not to handle the errors; to not loop in errors only static files are supported for this.</p> Lighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=79632012-11-08T09:39:06Zsdan
<ul><li><strong>Status</strong> changed from <i>Invalid</i> to <i>Reopened</i></li></ul><p>What I ask is a normal behavior.<br />We use lighttpd for serving static contents, no mod_rewrite, no mod_fastcgi, light as possible. <br />Please be more flexible because in the future you will lose lots of users.<br />Please give us an fix to give error 404 when the url is invalid.</p> Lighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=79642012-11-08T10:01:53Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Invalid</i></li></ul> Lighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=79652012-11-08T10:04:57Zsdan
<ul><li><strong>Status</strong> changed from <i>Invalid</i> to <i>Reopened</i></li></ul><p>Please give us a solution.<br />Invalidating this bug is not an answer.</p> Lighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=79662012-11-08T10:07:14Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Invalid</i></li></ul><p>Yes it is.</p> Lighttpd - Bug #2456: Why is server.error-handler-404 serving 200 instead of 404?https://redmine.lighttpd.net/issues/2456?journal_id=89402016-02-28T05:35:05Zgstrauss
<ul></ul><p>server.errorfile-prefix preserves the HTTP error status code when returning a static file error page in the HTTP response.</p>
<p>@sdan, if that is not what you're seeing, then please check your configuration. server.error-handler-404 (if set) takes precedence over server.errorfile-prefix for error codes 403 and 404, so please ensure that server.error-handler-404 <em>is not</em> set in your configuration if you are using server.errorfile-prefix to handle 403 and 404 pages.</p>
<p><a class="user active user-mention" href="https://redmine.lighttpd.net/users/7">@stbuehler</a>, <a class="external" href="https://redmine.lighttpd.net/projects/1/wiki/Server_error-handler-404Details">https://redmine.lighttpd.net/projects/1/wiki/Server_error-handler-404Details</a> description of server.error-handler-404 includes:</p>
<blockquote>
<p>You can use a dynamic or static page for the handler. If you use a static page, the server will return a 404 HTTP status code with the content of your static page.</p>
</blockquote>
<p>so it is easy to see how people might be confused when server.error-handler-404 returns 200 OK for static pages from error handler. I have updated the wiki documentation. Would you please take a look and review the change?</p>