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
This commit is contained in:
Eric Andersen 2004-02-04 11:10:28 +00:00
parent c71c18957d
commit ef43749e83

View File

@ -1271,7 +1271,9 @@ static int sendCgi(const char *url,
} }
firstLine = 0; firstLine = 0;
} }
bb_full_write(s, rbuf, count); if (bb_full_write(s, rbuf, count) != count)
break;
#ifdef DEBUG #ifdef DEBUG
if (config->debugHttpd) if (config->debugHttpd)
fprintf(stderr, "cgi read %d bytes\n", count); fprintf(stderr, "cgi read %d bytes\n", count);