mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
--TEST--
|
|
Bug #31454 (Incorrect adding PHPSESSID to links, which contains \r\n)
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--INI--
|
|
session.use_trans_sid=1
|
|
session.use_cookies=0
|
|
session.use_only_cookies=0
|
|
session.name=sid
|
|
--FILE--
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
|
|
session_start();
|
|
|
|
# Do not remove \r from this tests, they are essential!
|
|
?>
|
|
<html>
|
|
<head>
|
|
<title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
|
|
</head>
|
|
<body>
|
|
<p>See source html code</p>
|
|
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
|
|
style="font: normal 11pt Times New Roman">incorrect link</a><br />
|
|
<br />
|
|
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" style="font: normal 11pt Times New Roman">correct link</a>
|
|
</body>
|
|
</html>
|
|
--EXPECTF--
|
|
<html>
|
|
<head>
|
|
<title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
|
|
</head>
|
|
<body>
|
|
<p>See source html code</p>
|
|
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s"
|
|
style="font: normal 11pt Times New Roman">incorrect link</a><br />
|
|
<br />
|
|
<a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s" style="font: normal 11pt Times New Roman">correct link</a>
|
|
</body>
|
|
</html>
|