@@ -556,15 +556,6 @@ PHP_MSHUTDOWN_FUNCTION(curl)
556
556
}
557
557
/* }}} */
558
558
559
- /* {{{ curl_write_nothing
560
- * Used as a work around. See _php_curl_close_ex
561
- */
562
- static size_t curl_write_nothing (char * data , size_t size , size_t nmemb , void * ctx )
563
- {
564
- return size * nmemb ;
565
- }
566
- /* }}} */
567
-
568
559
/* {{{ curl_write */
569
560
static size_t curl_write (char * data , size_t size , size_t nmemb , void * ctx )
570
561
{
@@ -2742,20 +2733,6 @@ static void curl_free_obj(zend_object *object)
2742
2733
2743
2734
_php_curl_verify_handlers (ch , /* reporterror */ false);
2744
2735
2745
- /*
2746
- * Libcurl is doing connection caching. When easy handle is cleaned up,
2747
- * if the handle was previously used by the curl_multi_api, the connection
2748
- * remains open un the curl multi handle is cleaned up. Some protocols are
2749
- * sending content like the FTP one, and libcurl try to use the
2750
- * WRITEFUNCTION or the HEADERFUNCTION. Since structures used in those
2751
- * callback are freed, we need to use an other callback to which avoid
2752
- * segfaults.
2753
- *
2754
- * Libcurl commit d021f2e8a00 fix this issue and should be part of 7.28.2
2755
- */
2756
- curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_nothing );
2757
- curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write_nothing );
2758
-
2759
2736
curl_easy_cleanup (ch -> cp );
2760
2737
2761
2738
/* cURL destructors should be invoked only by last curl handle */
0 commit comments