pajoye          Sun Jun 28 09:50:14 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/curl   interface.c 
  Log:
  - MFH: fix regression introduced by the fix for #48518 (Ilia, Rasmus)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.57&r2=1.62.2.14.2.27.2.58&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.57 
php-src/ext/curl/interface.c:1.62.2.14.2.27.2.58
--- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.57    Mon Jun 15 12:37:37 2009
+++ php-src/ext/curl/interface.c        Sun Jun 28 09:50:14 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.27.2.57 2009/06/15 12:37:37 iliaa Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.27.2.58 2009/06/28 09:50:14 pajoye Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -2052,6 +2052,14 @@
                RETURN_STRINGL(ch->handlers->write->buf.c, 
ch->handlers->write->buf.len, 1);
        }
 
+       /* flush the file handle, so any remaining data is synched to disk */
+       if (ch->handlers->write->method == PHP_CURL_FILE && 
ch->handlers->write->fp) {
+               fflush(ch->handlers->write->fp);
+       }
+       if (ch->handlers->write_header->method == PHP_CURL_FILE && 
ch->handlers->write_header->fp) {
+               fflush(ch->handlers->write_header->fp);
+       }
+
        if (ch->handlers->write->method == PHP_CURL_RETURN) {
                RETURN_EMPTY_STRING();
        } else {



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

Reply via email to