Option to map send-file file-not-found error to normal 404
I've got tons of errors like this (don't ask):
2013-02-13 19:49:02: (mod_fastcgi.c.2641) send-file error: couldn't get stat_cache entry for: /srv/xwis.net/screenshots/619420_t.jpg
Is there an option to map those to normal 404s without logging?
#4 Updated by bert over 3 years ago
- File fastcgi-404-always.diffView added
- File fastcgi-404-option.diffView added
- Status changed from New to Patch Pending
Attached are two patches to do this.
One sends a 404 instead of 502 if the file turns out to be missing when using X-Sendfile or X-Sendfile2.
The second patch introduces an option ("allow-x-send-file-404", a boolean) to control this behavior. The default is to keep the current mod_fastcgi behavior and send a 502.
#11 Updated by gstrauss about 1 year ago
If a FastCGI application returned X-Sendfile (or related) and the file does not exist on the local server running lighttpd, then 404 Not Found does seem like a valid error response. 502 Bad Gateway imparts slightly less information, but if a backend FastCGI server is generating paths and is unable to validate existence of a file, there is little difference between 502 and 404.
@stbuehler: would you consider this if resubmitted as a pull request?
Also available in: Atom