…nd return code should not be affected. Without this fix, a webpage using eval() may return code 500. That might display fine and the 500 go unnoticed, but using AJAX or wget, the 500 will cause problems.
This fixes bug #54096.
When CURLOPT_POSTFIELDS is called more than once on the same curl handle, php/curl did not free the memory of the previous post data. This commit will fix the problem unless the curl handle was previously duplicated using the curl_copy_handle() function in which case we can not know if the post data is still in use or not by any curl handle
This reverts commit fad960a as required by Stas and Christopher
The zend_llist_element *next pointer is not necessary and removing it will also remove a write on memory
Libcurl is doing connection caching. When easy handle is cleaned up, if the handle was previously used by the curl_multi_api, the connection remains open un the curl multi handle is cleaned up. Some protocols are sending content like the FTP one, and libcurl try to use the WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those callback are freed, we need to use an other callback to which avoid segfaults. Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2
Fixed bug #63795
Since curl multi is used, it sometime happen that the resource is freed before the curl multi really execute the query. The patch will store the headers slist in the curlstream handle and free it only when the stream will be closed