From 24447dca5d308d0e4f5bab129d0050d6fe0c3163 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 28 Jan 2013 22:26:59 -0800 Subject: [PATCH] post-5.5 changes for bug #46439 as described in the RFC --- UPGRADING | 3 +++ ext/curl/interface.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index c34101dd96d89..a8fa5f85cfa2b 100755 --- a/UPGRADING +++ b/UPGRADING @@ -40,6 +40,9 @@ PHP X.Y UPGRADE NOTES 4. Changed Functions ======================================== +- cURL: + CURLOPT_SAFE_UPLOAD is now turned on by default and uploads with @file + do not work unless it is explicitly set to false. ======================================== 5. New Functions diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 07141485abc04..ab9e12cd96a25 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1822,7 +1822,7 @@ static void alloc_curl_handle(php_curl **ch) zend_llist_init(&(*ch)->to_free->str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0); zend_llist_init(&(*ch)->to_free->slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0); zend_llist_init(&(*ch)->to_free->post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0); - (*ch)->safe_upload = 0; /* for now, for BC reason we allow unsafe API */ + (*ch)->safe_upload = 1; /* for now, for BC reason we allow unsafe API */ } /* }}} */