summaryrefslogtreecommitdiff
path: root/tests/it_url.testserver.php
diff options
context:
space:
mode:
authorNathan Gass2017-10-12 11:38:57 +0200
committerNathan Gass2017-10-12 11:38:57 +0200
commit846a5a273275a4b7c9df066fcc1317418e283ec8 (patch)
tree9252cb06efe4972dfde1e6596f54f061185c0bab /tests/it_url.testserver.php
parentb8e699d2b11f0a75c9aa2dbdd005a063738b6668 (diff)
downloaditools-846a5a273275a4b7c9df066fcc1317418e283ec8.tar.gz
itools-846a5a273275a4b7c9df066fcc1317418e283ec8.tar.bz2
itools-846a5a273275a4b7c9df066fcc1317418e283ec8.zip
add test for correct handling of Location for 201 created http result
Diffstat (limited to 'tests/it_url.testserver.php')
-rw-r--r--tests/it_url.testserver.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/it_url.testserver.php b/tests/it_url.testserver.php
index 0fb3252..d394b58 100644
--- a/tests/it_url.testserver.php
+++ b/tests/it_url.testserver.php
@@ -17,6 +17,11 @@ switch ($_SERVER['PHP_SELF'])
it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent');
break;
+ case "/created_redirect":
+ header('Location: ' . it_url::absolute(U('redirect_target', array('type' => 'created'))), true, 201);
+ echo "Testserver output *before* created redirect";
+ exit;
+
case "/redirect_loop":
if ($_REQUEST['num'] > 0)
it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1)));