From 802aa4944d0e8ef7c15a57fc751dbebf63941115 Mon Sep 17 00:00:00 2001 From: ttaylor <ttaylor@585712.no-reply.drupal.org> Date: Fri, 10 Apr 2015 18:03:20 -0700 Subject: [PATCH] Issue #2427497 by ttaylor249: Fetching feed via SSL through proxy doesn't work --- libraries/http_request.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/http_request.inc b/libraries/http_request.inc index 84c4978e..cb4fc583 100644 --- a/libraries/http_request.inc +++ b/libraries/http_request.inc @@ -213,7 +213,12 @@ function http_request_get($url, $username = NULL, $password = NULL, $accept_inva // considered by CURLINFO_HEADER_SIZE (possibly cURL bug). // This data is only added when to HTTP header when working with a proxy. // Example string added: <HTTP/1.0 200 Connection established\r\n\r\n> - if ($proxy_server && _drupal_http_use_proxy($uri['host'])) { + // This was fixed in libcurl version 7.30.0 (0x71e00) (April 12, 2013), + // so this workaround only removes the proxy-added headers if we are using + // an older version of libcurl. + $curl_ver = curl_version(); + + if ($proxy_server && $curl_ver['version_number'] < 0x71e00 && _drupal_http_use_proxy($uri['host'])) { $http_header_break = "\r\n\r\n"; $response = explode($http_header_break, $data); if (count($response) > 2) { -- GitLab