|
Lines 565-571
Link Here
|
| 565 |
*/ |
565 |
*/ |
| 566 |
static void curl_free_post(void **post) |
566 |
static void curl_free_post(void **post) |
| 567 |
{ |
567 |
{ |
| 568 |
curl_formfree((struct HttpPost *) *post); |
568 |
curl_formfree((struct curl_httppost *) *post); |
| 569 |
} |
569 |
} |
| 570 |
/* }}} */ |
570 |
/* }}} */ |
| 571 |
|
571 |
|
|
Lines 605-611
Link Here
|
| 605 |
(void(*)(void *)) curl_free_string, 0); |
605 |
(void(*)(void *)) curl_free_string, 0); |
| 606 |
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), |
606 |
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), |
| 607 |
(void(*)(void *)) curl_free_slist, 0); |
607 |
(void(*)(void *)) curl_free_slist, 0); |
| 608 |
zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), |
608 |
zend_llist_init(&(*ch)->to_free.post, sizeof(struct curl_httppost), |
| 609 |
(void(*)(void *)) curl_free_post, 0); |
609 |
(void(*)(void *)) curl_free_post, 0); |
| 610 |
} |
610 |
} |
| 611 |
/* }}} */ |
611 |
/* }}} */ |
|
Lines 842-847
Link Here
|
| 842 |
ch->handlers->write_header->func = *zvalue; |
842 |
ch->handlers->write_header->func = *zvalue; |
| 843 |
ch->handlers->write_header->method = PHP_CURL_USER; |
843 |
ch->handlers->write_header->method = PHP_CURL_USER; |
| 844 |
break; |
844 |
break; |
|
|
845 |
/* |
| 845 |
case CURLOPT_PASSWDFUNCTION: |
846 |
case CURLOPT_PASSWDFUNCTION: |
| 846 |
if (ch->handlers->passwd) { |
847 |
if (ch->handlers->passwd) { |
| 847 |
zval_ptr_dtor(&ch->handlers->passwd); |
848 |
zval_ptr_dtor(&ch->handlers->passwd); |
|
Lines 851-862
Link Here
|
| 851 |
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd); |
852 |
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd); |
| 852 |
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch); |
853 |
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch); |
| 853 |
break; |
854 |
break; |
|
|
855 |
*/ |
| 854 |
case CURLOPT_POSTFIELDS: |
856 |
case CURLOPT_POSTFIELDS: |
| 855 |
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) { |
857 |
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) { |
| 856 |
zval **current; |
858 |
zval **current; |
| 857 |
HashTable *postfields; |
859 |
HashTable *postfields; |
| 858 |
struct HttpPost *first = NULL; |
860 |
struct curl_httppost *first = NULL; |
| 859 |
struct HttpPost *last = NULL; |
861 |
struct curl_httppost *last = NULL; |
| 860 |
char *postval; |
862 |
char *postval; |
| 861 |
char *string_key = NULL; |
863 |
char *string_key = NULL; |
| 862 |
ulong num_key; |
864 |
ulong num_key; |