'temporary')), 'temporary'); break; case "/perm_redirect": it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent'); break; case "/redirect_loop": if ($_REQUEST['num'] > 0) it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1))); break; case "/nohost_redirect": header('Location: /redirect_target?type=nohost', true, 301); exit; case "/relative_redirect": header('Location: ../redirect_target?type=relative', true, 301); exit; case "/redirect_target": echo 'Testserver output after ' . $_REQUEST['type'] . ' redirect'; break; case "/long_sleep": sleep(6); echo 'Testserver output after long sleep'; break; case "/short_sleep": sleep(4); echo 'Testserver output after short sleep'; break; case "/slow_response": for ($i = 0; $i < 6; $i++) { sleep(1); echo "Testserver slow output $i\n"; } break; case "/get_server_value": echo $_SERVER[$_REQUEST['key']]; break; case "/repeat": for ($i = 0; $i < $_REQUEST['num']; $i++) echo $_REQUEST['string']; break; default: fwrite($stderr, "Unknown path '$_SERVER[PHP_SELF]' not handled!\n"); }