summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2010-07-04 08:30:52 +0000
committerStefan Bühler <stbuehler@web.de>2010-07-04 08:30:52 +0000
commitc6c8ad2ac7b9db79327f0d012fdf3638161be38f (patch)
tree2fe8f72876b325fef02cb06b259a9b53727a47c5
parent48f1cf79b429c89d7d5c2862ecdf7c7239e6275a (diff)
downloadlighttpd-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--NEWS1
-rw-r--r--src/mod_fastcgi.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3cb76855..d643f5d7 100644
--- a/NEWS
+++ b/NEWS
@@ -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;
}
}