diff options
author | Kevin Turner <kevin@janrain.com> | 2008-06-11 22:18:05 +0000 |
---|---|---|
committer | Kevin Turner <kevin@janrain.com> | 2008-06-11 22:18:05 +0000 |
commit | ab5960e7b48a3a93b0b70cd01c5d3958ca56bff7 (patch) | |
tree | b392f2ef92480ed24a5f9730044d59b036c2c497 /Auth | |
parent | e72c76873773e1ac24fa0d5d580d20ca27bfa982 (diff) | |
download | php-openid-ab5960e7b48a3a93b0b70cd01c5d3958ca56bff7.zip php-openid-ab5960e7b48a3a93b0b70cd01c5d3958ca56bff7.tar.gz php-openid-ab5960e7b48a3a93b0b70cd01c5d3958ca56bff7.tar.bz2 |
[project @ Accept response code 206 from fetcher results. Fixes #260]
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/Yadis/XRIRes.php | 4 | ||||
-rw-r--r-- | Auth/Yadis/Yadis.php | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Auth/Yadis/XRIRes.php b/Auth/Yadis/XRIRes.php index b90591f..4e8e8d0 100644 --- a/Auth/Yadis/XRIRes.php +++ b/Auth/Yadis/XRIRes.php @@ -44,7 +44,7 @@ class Auth_Yadis_ProxyResolver { foreach ($service_types as $service_type) { $url = $this->queryURL($xri, $service_type); $response = $this->fetcher->get($url); - if ($response->status != 200) { + if ($response->status != 200 and $response->status != 206) { continue; } $xrds = Auth_Yadis_XRDS::parseXRDS($response->body); @@ -69,4 +69,4 @@ class Auth_Yadis_ProxyResolver { } } -?>
\ No newline at end of file +?> diff --git a/Auth/Yadis/Yadis.php b/Auth/Yadis/Yadis.php index b031cb9..dc1d19a 100644 --- a/Auth/Yadis/Yadis.php +++ b/Auth/Yadis/Yadis.php @@ -332,7 +332,8 @@ class Auth_Yadis_Yadis { $response = $fetcher->get($uri, $headers); - if (!$response || ($response->status != 200)) { + if (!$response || ($response->status != 200 and + $response->status != 206)) { $result->fail(); return $result; } @@ -361,7 +362,8 @@ class Auth_Yadis_Yadis { $response = $fetcher->get($yadis_location); - if ((!$response) || ($response->status != 200)) { + if ((!$response) || ($response->status != 200 and + $response->status != 206)) { $result->fail(); return $result; } @@ -377,4 +379,4 @@ class Auth_Yadis_Yadis { } } -?>
\ No newline at end of file +?> |