summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auth/Yadis/Yadis.php6
-rw-r--r--admin/texttest.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/Auth/Yadis/Yadis.php b/Auth/Yadis/Yadis.php
index b6dad09..064b5e2 100644
--- a/Auth/Yadis/Yadis.php
+++ b/Auth/Yadis/Yadis.php
@@ -200,10 +200,14 @@ class Auth_Yadis_Yadis {
* present, an instance of {@link Auth_Yadis_ParanoidHTTPFetcher}
* is returned. If not, an instance of
* {@link Auth_Yadis_PlainHTTPFetcher} is returned.
+ *
+ * If Auth_Yadis_CURL_OVERRIDE is defined, this method will always
+ * return a {@link Auth_Yadis_PlainHTTPFetcher}.
*/
function getHTTPFetcher($timeout = 20)
{
- if (Auth_Yadis_Yadis::curlPresent()) {
+ if (Auth_Yadis_Yadis::curlPresent() &&
+ (!defined('Auth_Yadis_CURL_OVERRIDE'))) {
$fetcher = new Auth_Yadis_ParanoidHTTPFetcher($timeout);
} else {
$fetcher = new Auth_Yadis_PlainHTTPFetcher($timeout);
diff --git a/admin/texttest.php b/admin/texttest.php
index 5564aae..bb01eee 100644
--- a/admin/texttest.php
+++ b/admin/texttest.php
@@ -45,6 +45,7 @@ function microtime_float()
}
$longopts = array('no-math',
+ 'no-curl',
'math-lib=',
'insecure-rand',
'thorough');
@@ -72,6 +73,9 @@ foreach ($flags as $flag) {
case '--no-math':
define('Auth_OpenID_NO_MATH_SUPPORT', true);
break;
+ case '--no-curl':
+ define('Auth_Yadis_CURL_OVERRIDE', true);
+ break;
case '--math-lib':
$math_type[] = $value;
break;