diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/it_url.testserver.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/it_url.testserver.php b/tests/it_url.testserver.php index d394b58..9f04b48 100644 --- a/tests/it_url.testserver.php +++ b/tests/it_url.testserver.php @@ -1,7 +1,7 @@ <?php -require '/www/server/phpinclude/auto_prepend.php'; $stderr = fopen('php://stderr', 'w'); fwrite($stderr, "Got Request: '" . $_SERVER['REQUEST_URI'] . "'\n"); +$base = 'http://' . $_SERVER['HTTP_HOST']; switch ($_SERVER['PHP_SELF']) { @@ -10,21 +10,21 @@ switch ($_SERVER['PHP_SELF']) break; case "/temp_redirect": - it_url::redirect(U("redirect_target", array('type' => 'temporary')), 'temporary'); + header("Location: $base/redirect_target?type=temporary", true, 303); break; case "/perm_redirect": - it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent'); + header("Location: $base/redirect_target?type=permanent", true, 301); break; case "/created_redirect": - header('Location: ' . it_url::absolute(U('redirect_target', array('type' => 'created'))), true, 201); + header("Location: $base/redirect_target?type=created", true, 201); echo "Testserver output *before* created redirect"; - exit; + break; case "/redirect_loop": if ($_REQUEST['num'] > 0) - it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1))); + header("Location: $base/redirect_loop?num=" . ($_REQUEST['num'] - 1), true, 303); break; case "/nohost_redirect": |