diff options
author | Marco Ceppi <marco@ceppi.net> | 2012-10-25 07:01:11 -0700 |
---|---|---|
committer | Marco Ceppi <marco@ceppi.net> | 2012-10-25 07:01:11 -0700 |
commit | 39206ec13b29e43f8cf604158ac7d1530ec29ee1 (patch) | |
tree | fbf2af7dd6f3bc0db58e8706860f0cfd4a7a18c7 | |
parent | 9a79bd586bd53bbc738d643d70c580aaceb27ccc (diff) | |
parent | 0fe1ec06e788fc3bce92d31e2106f7a12387341b (diff) | |
download | php-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.php | 8 |
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); |