diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-02-04 11:10:28 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-02-04 11:10:28 +0000 |
commit | d47629f4eb5bc0e0358f1ff3815edf5d1ef280de (patch) | |
tree | a221bb9e69de90de685659707e207e7a30eae792 | |
parent | b19ea36cdc7fd07021e1ffe86435eb223c362cde (diff) | |
download | busybox-w32-d47629f4eb5bc0e0358f1ff3815edf5d1ef280de.tar.gz busybox-w32-d47629f4eb5bc0e0358f1ff3815edf5d1ef280de.tar.bz2 busybox-w32-d47629f4eb5bc0e0358f1ff3815edf5d1ef280de.zip |
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
-rw-r--r-- | networking/httpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
1271 | } | 1271 | } |
1272 | firstLine = 0; | 1272 | firstLine = 0; |
1273 | } | 1273 | } |
1274 | bb_full_write(s, rbuf, count); | 1274 | if (bb_full_write(s, rbuf, count) != count) |
1275 | break; | ||
1276 | |||
1275 | #ifdef DEBUG | 1277 | #ifdef DEBUG |
1276 | if (config->debugHttpd) | 1278 | if (config->debugHttpd) |
1277 | fprintf(stderr, "cgi read %d bytes\n", count); | 1279 | fprintf(stderr, "cgi read %d bytes\n", count); |