php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44036 parse_url and trailing \n (\r)
Submitted: 2008-02-04 10:52 UTC Modified: 2008-02-04 21:04 UTC
From: leonid_boytsov at yahoo dot com Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 9 = ?
Subscribe to this entry?

 
 [2008-02-04 10:52 UTC] leonid_boytsov at yahoo dot com
Description:
------------
Trailing '\r' or '\n' in URL causes _ to be appended to either the path or to the host.


Reproduce code:
---------------
<? print_r(parse_url("http://test.com/\n")); ?>



Expected result:
----------------
Array
(
    [scheme] => http
    [host] => test.com
    [path] => /
)

Actual result:
--------------
Array
(
    [scheme] => http
    [host] => test.com
    [path] => /_
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-04 21:04 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

All non-valid (high/low ascii) chars get replaced with _
 [2014-06-13 08:10 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=333767
Log: FPM socket default mode

--
Patch by anonymous #44036
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC