summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authorKevin Turner <kevin@janrain.com>2008-06-25 21:48:06 +0000
committerKevin Turner <kevin@janrain.com>2008-06-25 21:48:06 +0000
commitd279f301a938d40440c7b0250aba825c07c2ba66 (patch)
tree931ec92a6c75b5335ba1fa265af1b0e1b8785621 /examples/detect.php
parent287cb7d61fb582e8db24bf9b94368fe7683d5113 (diff)
downloadphp-openid-d279f301a938d40440c7b0250aba825c07c2ba66.zip
php-openid-d279f301a938d40440c7b0250aba825c07c2ba66.tar.gz
php-openid-d279f301a938d40440c7b0250aba825c07c2ba66.tar.bz2
[project @ Make the detect script work with 206 responses from the fetcher]
Diffstat (limited to 'examples/detect.php')
-rw-r--r--examples/detect.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/detect.php b/examples/detect.php
index 51edac6..2d06ae1 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -426,11 +426,12 @@ function detect_fetcher($r, &$out)
if (isset($result)) {
$parts = array('An HTTP request was completed.');
// list ($code, $url, $data) = $result;
- if ($result->status != '200') {
+ if ($result->status != '200' && $result->status != '206') {
$ok = false;
$parts[] = $r->b(
- sprintf('Got %s instead of the expected HTTP status code ' .
- '(200).', $result->status));
+ sprintf(
+ 'Got %s instead of the expected HTTP status ' .
+ 'code (200 or 206).', $result->status));
}
$url = $result->final_url;