From: Michael Wallner Date: Tue, 14 Jun 2005 16:36:27 +0000 (+0000) Subject: - no need to allocate two contexts for the same payload X-Git-Tag: RELEASE_0_9_0~15 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=547af98947588b4a646ab2a10ff287a8ab8fb409;p=m6w6%2Fext-http - no need to allocate two contexts for the same payload --- diff --git a/http_request_api.c b/http_request_api.c index f82b0a7..2a4884a 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -334,8 +334,9 @@ PHP_HTTP_API STATUS _http_request_init(CURL *ch, http_request_method meth, const } if (response) { - HTTP_CURL_OPT(WRITEDATA, http_curl_callback_data(response)); - HTTP_CURL_OPT(WRITEHEADER, http_curl_callback_data(response)); + http_curl_callback_ctx *response_ctx = http_curl_callback_data(response); + HTTP_CURL_OPT(WRITEDATA, response_ctx); + HTTP_CURL_OPT(WRITEHEADER, response_ctx); } HTTP_CURL_OPT(HEADER, 0);