From: Michael Wallner Date: Fri, 17 Jan 2014 14:41:02 +0000 (+0100) Subject: Fix a rare crash with unitialized CURLOPT_HTTPHEADER X-Git-Tag: RELEASE_2_0_7~36 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=51abd4c4782ab49877a61f4334a61347d264b8a9;hp=49794e241a3b911b23aecc412ad1b7e570f278a3 Fix a rare crash with unitialized CURLOPT_HTTPHEADER --- diff --git a/package.xml b/package.xml index d8a82bb..d0b01ea 100644 --- a/package.xml +++ b/package.xml @@ -48,7 +48,7 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/ BSD, revised diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 4033b9f..c691842 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1492,8 +1492,8 @@ static STATUS php_http_client_curl_handler_prepare(php_http_client_curl_handler_ } } php_http_buffer_dtor(&header); - curl_easy_setopt(curl->handle, CURLOPT_HTTPHEADER, curl->options.headers); } + curl_easy_setopt(curl->handle, CURLOPT_HTTPHEADER, curl->options.headers); /* attach request body */ if ((body_size = php_http_message_body_size(msg->body))) {