fis querystring offset set bug
[m6w6/ext-http] / tests / url001.phpt
1 --TEST--
2 url from env
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --ENV--
8 SERVER_PORT=55555
9 HTTP_HOST=example.com
10 --GET--
11 s=b&i=0&e=&a[]=1&a[]=2
12 --FILE--
13 <?php
14 printf("%s\n", new http\Url);
15 printf("%s\n", new http\Url("other", "index"));
16 printf("%s\n", new http\Url(array("scheme" => "https", "port" => 443)));
17 printf("%s\n", new http\Url(array("path" => "/./up/../down/../././//index.php/.", "query" => null), null, http\Url::SANITIZE_PATH|http\Url::FROM_ENV));
18 printf("%s\n", new http\Url(null, null, 0));
19 ?>
20 DONE
21 --EXPECTF--
22 http://example.com:55555/?s=b&i=0&e=&a[]=1&a[]=2
23 http://example.com:55555/index?s=b&i=0&e=&a[]=1&a[]=2
24 https://example.com/?s=b&i=0&e=&a[]=1&a[]=2
25 http://example.com:55555/index.php/
26
27 DONE