From d09fdd877f492f843d574bba163c34e1b5188b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Wed, 7 Nov 2012 13:07:00 +0000 Subject: [PATCH] Handle ENAMETOOLONG, return 404 Not Found (fixes #2396, thx dererkazo) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2850 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/response.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 73b8b098..5eb6fe0e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ NEWS - 1.4.32 - * Code cleanup with clang/sparse (fixes #2437, thx kibi) * Ignore EPIPE/ECONNRESET after SSL_shutdown + * Handle ENAMETOOLONG, return 404 Not Found (fixes #2396, thx dererkazo) - 1.4.31 - 2012-05-31 * [ssl] fix segfault in counting renegotiations for openssl versions without TLSEXT/SNI (thx carpii for reporting) diff --git a/src/response.c b/src/response.c index e829cfd8..fd1ab195 100644 --- a/src/response.c +++ b/src/response.c @@ -611,6 +611,8 @@ handler_t http_response_prepare(server *srv, connection *con) { buffer_reset(con->physical.path); return HANDLER_FINISHED; + case ENAMETOOLONG: + /* file name to be read was too long. return 404 */ case ENOENT: con->http_status = 404;