| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
absoluteURI() URL: https://example.org/subdir/test.php?abc=123
|
|
|
3 |
--GET--
|
|
|
4 |
--ENV--
|
|
|
5 |
HTTP_HOST=example.org
|
|
|
6 |
HTTPS=on
|
|
|
7 |
SERVER_NAME=example.org
|
|
|
8 |
QUERY_STRING=abc=123
|
|
|
9 |
SERVER_PORT=443
|
|
|
10 |
PATH_INFO=
|
|
|
11 |
REQUEST_URI=/subdir/test.php?abc=123
|
|
|
12 |
SCRIPT_NAME=/subdir/test.php
|
|
|
13 |
--FILE--
|
|
|
14 |
<?php
|
|
|
15 |
/**
|
|
|
16 |
* This test checks that absoluteURI() still works with just a QUERY_STRING
|
|
|
17 |
* passed to the script.
|
|
|
18 |
*
|
|
|
19 |
* Relative URLs are resolved to the current script
|
|
|
20 |
*
|
|
|
21 |
* PHP version 4 and 5
|
|
|
22 |
*
|
|
|
23 |
* @category HTTP
|
|
|
24 |
* @package HTTP
|
|
|
25 |
* @author Philippe Jausions <jausions@php.net>
|
|
|
26 |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
|
|
|
27 |
* @link http://pear.php.net/package/HTTP
|
|
|
28 |
*/
|
|
|
29 |
require 'absoluteURI.inc';
|
|
|
30 |
|
|
|
31 |
?>
|
|
|
32 |
--EXPECT--
|
|
|
33 |
|| => https://example.org/subdir/test.php?abc=123
|
|
|
34 |
?new=value|| => https://example.org/subdir/test.php?new=value
|
|
|
35 |
#anchor|| => https://example.org/subdir/test.php?abc=123#anchor
|
|
|
36 |
/page.html|| => https://example.org/page.html
|
|
|
37 |
page.html|| => https://example.org/subdir/page.html
|
|
|
38 |
page.html|http| => http://example.org/subdir/page.html
|
|
|
39 |
page.html|http|80 => http://example.org/subdir/page.html
|
|
|
40 |
page.html|http|8080 => http://example.org:8080/subdir/page.html
|
|
|
41 |
page.html|https| => https://example.org/subdir/page.html
|
|
|
42 |
page.html|https|443 => https://example.org/subdir/page.html
|
|
|
43 |
page.html||8080 => https://example.org:8080/subdir/page.html
|
|
|
44 |
page.html|https|8888 => https://example.org:8888/subdir/page.html
|