[BusyBox-cvs] busybox/networking httpd.c,1.21,1.22

Erik Andersen andersen at busybox.net
Wed Feb 4 11:10:30 UTC 2004


Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv17465/networking

Modified Files:
	httpd.c 
Log Message:
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



Index: httpd.c
===================================================================
RCS file: /var/cvs/busybox/networking/httpd.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- httpd.c	19 Dec 2003 11:23:47 -0000	1.21
+++ httpd.c	4 Feb 2004 11:10:28 -0000	1.22
@@ -1271,7 +1271,9 @@
 	    }
 	    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);




More information about the busybox-cvs mailing list