bug36459.phpt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Bug #31454 (Incorrect adding PHPSESSID to links, which contains \r\n)
  3. --SKIPIF--
  4. <?php include('skipif.inc'); ?>
  5. --INI--
  6. session.use_trans_sid=1
  7. session.use_cookies=0
  8. session.use_only_cookies=0
  9. session.name=sid
  10. --FILE--
  11. <?php
  12. error_reporting(E_ALL);
  13. session_start();
  14. # Do not remove \r from this tests, they are essential!
  15. ?>
  16. <html>
  17. <head>
  18. <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
  19. </head>
  20. <body>
  21. <p>See source html code</p>
  22. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
  23. style="font: normal 11pt Times New Roman">incorrect link</a><br />
  24. <br />
  25. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" style="font: normal 11pt Times New Roman">correct link</a>
  26. </body>
  27. </html>
  28. --EXPECTF--
  29. <html>
  30. <head>
  31. <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
  32. </head>
  33. <body>
  34. <p>See source html code</p>
  35. <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s"
  36. style="font: normal 11pt Times New Roman">incorrect link</a><br />
  37. <br />
  38. <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>
  39. </body>
  40. </html>