- disallow detaching requests while executing progress callbacks
[m6w6/ext-http] / http_request_api.c
index b6d7b1e76e4cb602e0ef8e9a13626b4160ced6c5..b253a97caae73cca8b99dcf883dd39889b81e52c 100644 (file)
@@ -899,7 +899,9 @@ static int http_curl_progress_callback(void *ctx, double dltotal, double dlnow,
        add_assoc_double(param, "ulnow", ulnow);
        
        with_error_handling(EH_NORMAL, NULL) {
+               request->_in_progress_cb = 1;
                call_user_function(EG(function_table), NULL, request->_progress_callback, &retval, 1, &param TSRMLS_CC);
+               request->_in_progress_cb = 0;
        } end_error_handling();
        
        zval_ptr_dtor(&param);