|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: leonid_boytsov at yahoo dot com
New email:
PHP Version: OS:


 [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: Tue Apr 23 15:01:32 2024 UTC