From 0fe1ec06e788fc3bce92d31e2106f7a12387341b Mon Sep 17 00:00:00 2001 From: itsour Date: Thu, 25 Oct 2012 20:09:41 +0800 Subject: Set proxy options only if Auth_OpenID_HTTP_PROXY is explicitly set --- Auth/Yadis/ParanoidHTTPFetcher.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php index c44adfe..4848a2b 100644 --- a/Auth/Yadis/ParanoidHTTPFetcher.php +++ b/Auth/Yadis/ParanoidHTTPFetcher.php @@ -141,7 +141,9 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); } } - + if (defined('Auth_OpenID_HTTP_PROXY')) { + curl_setopt($c, CURLOPT_PROXY, Auth_OpenID_HTTP_PROXY); + } curl_exec($c); $code = curl_getinfo($c, CURLINFO_HTTP_CODE); @@ -205,6 +207,10 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { curl_setopt($c, CURLOPT_NOSIGNAL, true); } + if (defined('Auth_OpenID_HTTP_PROXY')) { + curl_setopt($c, CURLOPT_PROXY, Auth_OpenID_HTTP_PROXY); + } + curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $body); curl_setopt($c, CURLOPT_TIMEOUT, $this->timeout); -- cgit v1.1