From 791511f3bc18cdc68b3f27b43d9396cf56d99e5a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 5 Feb 2015 16:26:19 +0100 Subject: [PATCH 1/1] ensure options are applied before the headers are set --- php_http_client_curl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 8aaeaa0..e92834d 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1743,6 +1743,9 @@ static STATUS php_http_client_curl_handler_prepare(php_http_client_curl_handler_ } } + /* apply options */ + php_http_options_apply(&php_http_curle_options, enqueue->options, curl); + /* request headers */ php_http_message_update_headers(msg); if (zend_hash_num_elements(&msg->hdrs)) { @@ -1798,8 +1801,6 @@ static STATUS php_http_client_curl_handler_prepare(php_http_client_curl_handler_ curl_easy_setopt(curl->handle, CURLOPT_POSTFIELDSIZE, 0L); } - php_http_options_apply(&php_http_curle_options, enqueue->options, curl); - return SUCCESS; } -- 2.30.2