summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--ext/curl/interface.c11
-rw-r--r--ext/curl/php_curl.h5
3 files changed, 6 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index 2e83f29921..7028faf250 100644
--- 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! >>>
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 788be78f28..4de678eb79 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -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) {
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index fe771970cb..6acfc5eedd 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -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;