stas            Mon Feb 21 07:29:05 2005 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/main       SAPI.c 
  Log:
  packport fix from PHP5: read post data if they wreen't read
  # this is needed for FCGI correct functioning
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.155.2.22&r2=1.155.2.23&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.155.2.22 php-src/main/SAPI.c:1.155.2.23
--- php-src/main/SAPI.c:1.155.2.22      Thu Aug 19 16:35:36 2004
+++ php-src/main/SAPI.c Mon Feb 21 07:29:02 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: SAPI.c,v 1.155.2.22 2004/08/19 20:35:36 bfrance Exp $ */
+/* $Id: SAPI.c,v 1.155.2.23 2005/02/21 12:29:02 stas Exp $ */
 
 #include <ctype.h>
 #include <sys/stat.h>
@@ -388,6 +388,16 @@
        zend_llist_destroy(&SG(sapi_headers).headers);
        if (SG(request_info).post_data) {
                efree(SG(request_info).post_data);
+       } else if (SG(server_context)) {
+               if(sapi_module.read_post) { 
+                       /* make sure we've consumed all request input data */
+                       char dummy[SAPI_POST_BLOCK_SIZE];
+                       int read_bytes;
+
+                       while((read_bytes = sapi_module.read_post(dummy, 
sizeof(dummy)-1 TSRMLS_CC)) > 0) {
+                               SG(read_post_bytes) += read_bytes;
+                       }
+               }
        }
        if (SG(request_info).raw_post_data) {
                efree(SG(request_info).raw_post_data);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to