|  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:
Solve the problem:
42 + 2 = ?
Subscribe to this entry?

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

Reproduce code:
<? print_r(parse_url("\n")); ?>

Expected result:
    [scheme] => http
    [host] =>
    [path] => /

Actual result:
    [scheme] => http
    [host] =>
    [path] => /_


Add a Patch

Pull Requests

Add a Pull Request


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

All non-valid (high/low ascii) chars get replaced with _
 [2014-06-13 08:10 UTC]
Automatic comment from SVN on behalf of salathe
Log: FPM socket default mode

Patch by anonymous #44036
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 10:01:34 2024 UTC