xref: /PHP-7.4/ext/session/tests/bug74892.phpt (revision ced5bb7d)
1--TEST--
2Bug #74892 Url Rewriting (trans_sid) not working on urls that start with #
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7ini_set('session.use_cookies', '0');
8ini_set('session.use_only_cookies',0);
9ini_set('session.use_trans_sid',1);
10ini_set('session.trans_sid_hosts','php.net');
11session_id('sessionidhere');
12session_start();
13
14?>
15<p><a href="index.php">Click This Anchor Tag!</a></p>
16<p><a href="index.php#place">External link with anchor</a></p>
17<p><a href="http://php.net#foo">External link with anchor 2</a></p>
18<p><a href="#place">Internal link</a></p>
19===DONE===
20--EXPECT--
21<p><a href="index.php?PHPSESSID=sessionidhere">Click This Anchor Tag!</a></p>
22<p><a href="index.php?PHPSESSID=sessionidhere#place">External link with anchor</a></p>
23<p><a href="http://php.net?PHPSESSID=sessionidhere#foo">External link with anchor 2</a></p>
24<p><a href="#place">Internal link</a></p>
25===DONE===
26