summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Ceppi <marco@ceppi.net>2012-10-25 07:01:11 -0700
committerMarco Ceppi <marco@ceppi.net>2012-10-25 07:01:11 -0700
commit39206ec13b29e43f8cf604158ac7d1530ec29ee1 (patch)
treefbf2af7dd6f3bc0db58e8706860f0cfd4a7a18c7
parent9a79bd586bd53bbc738d643d70c580aaceb27ccc (diff)
parent0fe1ec06e788fc3bce92d31e2106f7a12387341b (diff)
downloadphp-openid-39206ec13b29e43f8cf604158ac7d1530ec29ee1.zip
php-openid-39206ec13b29e43f8cf604158ac7d1530ec29ee1.tar.gz
php-openid-39206ec13b29e43f8cf604158ac7d1530ec29ee1.tar.bz2
Merge pull request #84 from pixnet/master
Set proxy options only if Auth_OpenID_HTTP_PROXY is explicitly set
-rw-r--r--Auth/Yadis/ParanoidHTTPFetcher.php8
1 files changed, 7 insertions, 1 deletions
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);