From:             [EMAIL PROTECTED]
Operating system: RedHat 7.2
PHP version:      4.2.1
PHP Bug Type:     *URL Functions
Bug description:  parse_url shouldn't work with http://www..com

If you submit a url like www..com to parse_url, it will parse it without
any error, although this kind of URL is incorrect.

Try this:

<?

$url="http://www..com";;

$a=parse_url($url);

$host=$a[host];
$scheme=$a[scheme];
$path=$a[path];

echo("<LI>SCHEME=$scheme<LI>HOST=$host<LI>PATH=$path");

?>

It will return:

SCHEME=http
HOST=www..com
PATH=

The same kind of thing happens if url="qwerty", as it will return "qwerty"
as the path.

-- 
Edit bug report at http://bugs.php.net/?id=17533&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17533&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17533&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17533&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17533&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17533&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17533&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17533&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17533&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17533&r=globals

Reply via email to