Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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