refresh all package patches in the buildroot using quilt
[openwrt/openwrt.git] / package / busybox / patches / 420-httpd_sendcgi_fix.patch
1 Index: busybox-1.4.2/networking/httpd.c
2 ===================================================================
3 --- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.585566840 +0200
4 +++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200
5 @@ -1218,9 +1218,10 @@
6 #if PIPESIZE >= MAX_MEMORY_BUFF
7 # error "PIPESIZE >= MAX_MEMORY_BUFF"
8 #endif
9 - /* NB: was safe_read. If it *has to be* safe_read, */
10 - /* please explain why in this comment... */
11 - count = full_read(inFd, rbuf, PIPESIZE);
12 + /* reverted back to safe_read, otherwise httpd may block if the */
13 + /* cgi-script outputs page date before it has fully received all */
14 + /* (eg POST) data */
15 + count = safe_read(inFd, rbuf, PIPESIZE);
16 if (count == 0)
17 break; /* closed */
18 if (count < 0)