summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen2004-02-04 11:10:28 +0000
committerEric Andersen2004-02-04 11:10:28 +0000
commitef43749e83592288c9e8048689edaf72498784b8 (patch)
treea221bb9e69de90de685659707e207e7a30eae792 /networking
parentc71c18957d9f990d7373ab39d84e9156dcc7391d (diff)
downloadbusybox-ef43749e83592288c9e8048689edaf72498784b8.zip
busybox-ef43749e83592288c9e8048689edaf72498784b8.tar.gz
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
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index a02b63a..9b36101 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);