aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-20 18:42:52 +0000
committerpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-20 18:42:52 +0000
commit952cc10bc1ae21819d04ea82965ce55f14b3ae80 (patch)
treec20f6360151f390afb2fea25a9be37481da51374
parent9fce4b2554a83ea5efd122cdb5b056c1dbd910e9 (diff)
downloadbusybox-w32-952cc10bc1ae21819d04ea82965ce55f14b3ae80.tar.gz
busybox-w32-952cc10bc1ae21819d04ea82965ce55f14b3ae80.tar.bz2
busybox-w32-952cc10bc1ae21819d04ea82965ce55f14b3ae80.zip
applying fix for:
0000185: httpd infinite loop when piping to CGI script git-svn-id: svn://busybox.net/trunk/busybox@10877 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--networking/httpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 94fcfc8c1..e3f4027dc 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1259,6 +1259,8 @@ static int sendCgi(const char *url,
1259 post_readed_idx += count; 1259 post_readed_idx += count;
1260 if(post_readed_size == 0) 1260 if(post_readed_size == 0)
1261 post_readed_idx = 0; 1261 post_readed_idx = 0;
1262 } else {
1263 post_readed_size = post_readed_idx = bodyLen = 0; /* broken pipe to CGI */
1262 } 1264 }
1263 } else if(bodyLen > 0 && post_readed_size == 0 && FD_ISSET(a_c_r, &readSet)) { 1265 } else if(bodyLen > 0 && post_readed_size == 0 && FD_ISSET(a_c_r, &readSet)) {
1264 count = bodyLen > sizeof(wbuf) ? sizeof(wbuf) : bodyLen; 1266 count = bodyLen > sizeof(wbuf) ? sizeof(wbuf) : bodyLen;
@@ -1266,7 +1268,7 @@ static int sendCgi(const char *url,
1266 if(count > 0) { 1268 if(count > 0) {
1267 post_readed_size += count; 1269 post_readed_size += count;
1268 bodyLen -= count; 1270 bodyLen -= count;
1269 } else { 1271 } else {
1270 bodyLen = 0; /* closed */ 1272 bodyLen = 0; /* closed */
1271 } 1273 }
1272 } 1274 }