cvs: php4 /sapi/cgi cgi_main.c
| From: | Ben Mansell | Date: | Fri, 07 Mar 2003 14:48:28 +0000 |
| Subject: | cvs: php4 /sapi/cgi cgi_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19450@lists.php.net to get a copy of this message | ||
joosters Fri Mar 7 09:48:28 2003 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
Fix bug whereby a webserver closing stdout from the CGI/FastCGI binary
would cause PHP to get caught in an infinite loop of failing write()
syscalls.
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.214 php4/sapi/cgi/cgi_main.c:1.215
--- php4/sapi/cgi/cgi_main.c:1.214 Mon Feb 17 08:29:59 2003
+++ php4/sapi/cgi/cgi_main.c Fri Mar 7 09:48:28 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.214 2003/02/17 13:29:59 zeev Exp $ */
+/* $Id: cgi_main.c,v 1.215 2003/03/07 14:48:28 joosters Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -254,6 +254,7 @@
ret = sapi_cgibin_single_write(ptr, remaining TSRMLS_CC);
if (!ret) {
php_handle_aborted_connection();
+ return str_length - remaining;
}
ptr += ret;
remaining -= ret;