summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;