]> granicus.if.org Git - php/commitdiff
Fixed bug #55635
authorPierrick Charron <pierrick@php.net>
Tue, 22 Nov 2011 17:13:26 +0000 (17:13 +0000)
committerPierrick Charron <pierrick@php.net>
Tue, 22 Nov 2011 17:13:26 +0000 (17:13 +0000)
NEWS
ext/curl/interface.c
ext/curl/php_curl.h

diff --git a/NEWS b/NEWS
index 2e83f29921f180ae55382f061e1fd48a1a664626..7028faf2500381b61bada2c9f1ac50c4a25339c5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,4 +5,8 @@ PHP                                                                        NEWS
 - General improvements:
   . World domination
 
+- Curl:
+  . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
+       still exists for backward compatibility but is doing nothing). (Pierrick)
+
 <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
index 788be78f282d38b59805598667169dd65c8a8387..4de678eb7998235f9f2197bebd9c5d6611cf37ea 100644 (file)
@@ -261,7 +261,6 @@ int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */
                        ch->handlers->write->stream = NULL;
 
                        ch->handlers->write->method = PHP_CURL_STDOUT;
-                       ch->handlers->write->type   = PHP_CURL_ASCII;
                        curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch);
                }
        }
@@ -1536,7 +1535,6 @@ PHP_FUNCTION(curl_init)
        ch->cp = cp;
 
        ch->handlers->write->method = PHP_CURL_STDOUT;
-       ch->handlers->write->type   = PHP_CURL_ASCII;
        ch->handlers->read->method  = PHP_CURL_DIRECT;
        ch->handlers->write_header->method = PHP_CURL_IGNORE;
 
@@ -1610,7 +1608,6 @@ PHP_FUNCTION(curl_copy_handle)
                dupch->handlers->write->stream = ch->handlers->write->stream;
        }
        dupch->handlers->write->method = ch->handlers->write->method;
-       dupch->handlers->write->type   = ch->handlers->write->type;
        if (ch->handlers->read->stream) {
                Z_ADDREF_P(ch->handlers->read->stream);
        }
@@ -1953,13 +1950,7 @@ string_copy:
                        }
                        break;
                case CURLOPT_BINARYTRANSFER:
-                       convert_to_long_ex(zvalue);
-
-                       if (Z_LVAL_PP(zvalue)) {
-                               ch->handlers->write->type = PHP_CURL_BINARY;
-                       } else {
-                               ch->handlers->write->type = PHP_CURL_ASCII;
-                       }
+                       /* Do nothing, just backward compatibility */
                        break;
                case CURLOPT_WRITEFUNCTION:
                        if (ch->handlers->write->func_name) {
index fe771970cb71c987e6aa1fd0e2ffb22c1e3ded34..6acfc5eedde88109702b5eb6ee6702efa0f3303d 100644 (file)
@@ -41,14 +41,12 @@ extern zend_module_entry curl_module_entry;
 #define curl_module_ptr &curl_module_entry
 
 #define CURLOPT_RETURNTRANSFER 19913
-#define CURLOPT_BINARYTRANSFER 19914
+#define CURLOPT_BINARYTRANSFER 19914 /* For Backward compatibility */
 #define PHP_CURL_STDOUT 0
 #define PHP_CURL_FILE   1
 #define PHP_CURL_USER   2
 #define PHP_CURL_DIRECT 3
 #define PHP_CURL_RETURN 4
-#define PHP_CURL_ASCII  5
-#define PHP_CURL_BINARY 6
 #define PHP_CURL_IGNORE 7
 
 extern int  le_curl;
@@ -85,7 +83,6 @@ typedef struct {
        FILE            *fp;
        smart_str       buf;
        int             method;
-       int             type;
        zval            *stream;
 } php_curl_write;