#44036 [Opn->Bgs]: parse_url and trailing \n (\r)

From: Date: Mon, 04 Feb 2008 21:04:26 +0000
Subject: #44036 [Opn->Bgs]: parse_url and trailing \n (\r)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121971@lists.php.net to get a copy of this message
ID: 44036 Updated by: iliaa@php.net Reported By: leonid_boytsov at yahoo dot com -Status: Open +Status: Bogus Bug Type: *URL Functions Operating System: Linux PHP Version: 5.2.5 New Comment: 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 _ Previous Comments: ------------------------------------------------------------------------ [2008-02-04 10:52:48] 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] => /_ ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44036&edit=1

« previous php.bugs (#121971) next »