xref: /PHP-8.2/ext/session/tests/bug50308.phpt (revision b5a14e6c)
1--TEST--
2Bug #50308 (session id not appended properly for empty anchor tags)
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--INI--
8session.name=PHPSESSID
9session.save_handler=files
10session.use_trans_sid=1
11session.use_only_cookies=0
12--FILE--
13<?php
14@session_start();
15?>
16<a href=""/>
17<a href="" />
18<a href="foo"/>
19<a href="foo" />
20<a href=foo/>
21<a href="/">
22<a href=/>
23<a href=?foo=bar/>
24<a href="?foo=bar"/>
25<a href=./>
26<a href="./">
27--EXPECTF--
28<a href="?PHPSESSID=%s"/>
29<a href="?PHPSESSID=%s" />
30<a href="foo?PHPSESSID=%s"/>
31<a href="foo?PHPSESSID=%s" />
32<a href=foo/?PHPSESSID=%s>
33<a href="/?PHPSESSID=%s">
34<a href=/?PHPSESSID=%s>
35<a href=?foo=bar/&PHPSESSID=%s>
36<a href="?foo=bar&PHPSESSID=%s"/>
37<a href=./?PHPSESSID=%s>
38<a href="./?PHPSESSID=%s">
39