summaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/uhttpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/src/uhttpd.c')
-rw-r--r--package/uhttpd/src/uhttpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c
index 6f5e61634..a818e1c45 100644
--- a/package/uhttpd/src/uhttpd.c
+++ b/package/uhttpd/src/uhttpd.c
@@ -401,6 +401,10 @@ static struct http_request * uh_http_header_recv(struct client *cl)
{
ensure_out(rlen = uh_tcp_recv(cl, bufptr, rlen));
+ /* unexpected eof - #7904 */
+ if( rlen == 0 )
+ return NULL;
+
blen -= rlen;
bufptr += rlen;
}