X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=292db7b6344fb1d014c2e8fb4e0ab4a7cf8afde2;hp=3fbfdbf61d198262d57ec2c58bec84a459be6e2b;hb=d39bab135c7cde004d56019800e94189bef45aee;hpb=b46b6f8c9261ed2b7c5198169073b0ed18a9c4f5 diff --git a/http_request_object.c b/http_request_object.c index 3fbfdbf..292db7b 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -241,7 +241,7 @@ HTTP_BEGIN_ARGS(methodExists, 1) HTTP_ARG_VAL(method, 0) HTTP_END_ARGS; -#ifdef HAVE_CURL_GETFORMDATA +#if defined(HAVE_CURL_GETFORMDATA) || defined(HAVE_CURL_FORMGET) HTTP_BEGIN_ARGS(encodeBody, 2) HTTP_ARG_VAL(fields, 0) HTTP_ARG_VAL(files, 0) @@ -721,6 +721,8 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this ret = FAILURE; } + http_request_set_progress_callback(obj->request, NULL); + if (!EG(exception) && zend_hash_exists(&Z_OBJCE_P(getThis())->function_table, "onfinish", sizeof("onfinish"))) { zval *param; @@ -732,8 +734,6 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this zval_ptr_dtor(¶m); } - http_request_set_progress_callback(obj->request, NULL); - return ret; }