diff options
author | Stefan Bühler <stbuehler@web.de> | 2010-07-04 08:30:52 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2010-07-04 08:30:52 +0000 |
commit | c6c8ad2ac7b9db79327f0d012fdf3638161be38f (patch) | |
tree | 2fe8f72876b325fef02cb06b259a9b53727a47c5 | |
parent | 48f1cf79b429c89d7d5c2862ecdf7c7239e6275a (diff) | |
download | lighttpd-git-c6c8ad2ac7b9db79327f0d012fdf3638161be38f.tar.gz |
mod_fastcgi: Send 502 "Bad Gateway" if we couldn't open the file for X-Sendfile (fixes #2226)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2735 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/mod_fastcgi.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -17,6 +17,7 @@ NEWS * Fix etag formatting on boxes with 32-bit longs * Fix two compiler warnings * mod_accesslog: fix %p for ipv6 sockets (fixes #2228, thx jo.henke) + * mod_fastcgi: Send 502 "Bad Gateway" if we couldn't open the file for X-Sendfile (fixes #2226) - 1.4.26 - 2010-02-07 * Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105) diff --git a/src/mod_fastcgi.c b/src/mod_fastcgi.c index 89526bcd..acd20a69 100644 --- a/src/mod_fastcgi.c +++ b/src/mod_fastcgi.c @@ -2680,6 +2680,10 @@ static int fcgi_demux_response(server *srv, handler_ctx *hctx) { log_error_write(srv, __FILE__, __LINE__, "sb", "send-file error: couldn't get stat_cache entry for:", ds->value); + con->http_status = 502; + hctx->send_content_body = 0; + con->file_started = 1; + break; } } |