Bug #52803 [NEW]: parse_url can't handle urls without a scheme.
| From: | leif at flattr dot com | Date: | Thu, 09 Sep 2010 16:02:24 +0000 |
| Subject: | Bug #52803 [NEW]: parse_url can't handle urls without a scheme. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-154213@lists.php.net to get a copy of this message | ||
From:
Operating system: osx and debian linux
PHP version: 5.3.3
Package: *General Issues
Bug Type: Bug
Bug description:parse_url can't handle urls without a scheme.
Description:
------------
parse_url will falsely use the hostname as path if url doesn't include the
scheme part.
Test script:
---------------
php > echo var_dump(parse_url('hejhopp.com/'));
Expected result:
----------------
array(1) {
["host"]=>
string(11) "hejhopp.com"
["path"]=>
string(1) "/"
}
Actual result:
--------------
array(1) {
["path"]=>
string(12) "hejhopp.com/"
}
--
Edit bug report at http://bugs.php.net/bug.php?id=52803&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52803&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52803&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52803&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52803&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52803&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52803&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52803&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52803&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52803&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52803&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52803&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52803&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52803&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52803&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52803&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52803&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52803&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52803&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52803&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52803&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52803&r=mysqlcfg