From d47629f4eb5bc0e0358f1ff3815edf5d1ef280de Mon Sep 17 00:00:00 2001 From: andersen Date: Wed, 4 Feb 2004 11:10:28 +0000 Subject: Joe.C writes: Hi, When httpd connection is closed, bosybox httpd will not stop reading from CGI program. This patch fix this problem. It check the return value of bb_full_write and stop reading from CGI if the connection is closed. Please apply this patch. Joe.C git-svn-id: svn://busybox.net/trunk/busybox@8400 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- networking/httpd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/networking/httpd.c b/networking/httpd.c index a02b63a38..9b36101d7 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1271,7 +1271,9 @@ static int sendCgi(const char *url, } firstLine = 0; } - bb_full_write(s, rbuf, count); + if (bb_full_write(s, rbuf, count) != count) + break; + #ifdef DEBUG if (config->debugHttpd) fprintf(stderr, "cgi read %d bytes\n", count); -- cgit v1.2.3-55-g6feb