- missing part of HAVE_CURL_FORMGET
[m6w6/ext-http] / http_request_object.c
index 3f37f46f9ada3d1549d8ccbf474f6ed4985973ba..292db7b6344fb1d014c2e8fb4e0ab4a7cf8afde2 100644 (file)
@@ -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)
@@ -334,7 +334,7 @@ zend_function_entry http_request_object_fe[] = {
        HTTP_REQUEST_ALIAS(methodUnregister, http_request_method_unregister)
        HTTP_REQUEST_ALIAS(methodName, http_request_method_name)
        HTTP_REQUEST_ALIAS(methodExists, http_request_method_exists)
-#ifdef HAVE_CURL_GETFORMDATA
+#if defined(HAVE_CURL_GETFORMDATA) || defined(HAVE_CURL_FORMGET)
        HTTP_REQUEST_ALIAS(encodeBody, http_request_body_encode)
 #endif
        EMPTY_FUNCTION_ENTRY
@@ -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;