Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / resources / redirect.php
1 <?php
2     $url = $_GET['url'];
3     $refresh = $_GET['refresh'];
4
5     if (isset($refresh)) {
6         header("HTTP/1.1 200");
7         header("Refresh: $refresh; url=$url");
8         return;
9     }
10
11     header("Location: $url");
12     if (isset($_GET['cors_allow_origin']))
13         header("Access-Control-Allow-Origin: " . $_GET['cors_allow_origin']);
14
15     $code = $_GET['code'];
16     if (!isset($code))
17         $code = 302;
18     header("HTTP/1.1 $code");
19 ?>