zend_object_value _http_request_object_new(zend_class_entry *ce TSRMLS_DC)
{
- return http_request_object_new_ex(ce, curl_easy_init(), NULL);
+ return http_request_object_new_ex(ce, NULL, NULL);
}
zend_object_value _http_request_object_new_ex(zend_class_entry *ce, CURL *ch, http_request_object **ptr TSRMLS_DC)
old_zo = zend_objects_get_address(this_ptr TSRMLS_CC);
new_ov = http_request_object_new_ex(old_zo->ce, curl_easy_duphandle(old_obj->request->ch), &new_obj);
+ http_curl_init_ex(new_obj->request->ch, new_obj->request, new_obj->request->_error);
zend_objects_clone_members(&new_obj->zo, new_ov, old_zo, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
phpstr_append(&new_obj->history, old_obj->history.data, old_obj->history.used);
STATUS status = SUCCESS;
http_request_reset(obj->request);
- HTTP_CHECK_CURL_INIT(obj->request->ch, curl_easy_init(), return FAILURE);
+ HTTP_CHECK_CURL_INIT(obj->request->ch, http_curl_init(obj->request), return FAILURE);
obj->request->url = http_absolute_url(Z_STRVAL_P(GET_PROP(url)));