[php-src] Issue #8370: parse_url mistakes hostname with path

From: Date: Thu, 14 Apr 2022 19:37:24 +0000
Subject: [php-src] Issue #8370: parse_url mistakes hostname with path
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240975@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8370 Comment Author: iluuu1994 I agree with @cmb69. Clarifying in the docs seems sensible. Not that even browsers consider a <a href="www.google.com">Google</a> as a relative link: > file:///tmp/test.html -> file:///tmp/www.google.com I'm converting this to a documentation issue. The sentence could be adjusted to something like the following and include a few examples like the snipped you posted above. > Partial and invalid URLs are also accepted, parse_url() tries its best to parse them correctly. > Due to ambiguities it's impossible to correctly parse all invalid URLs. Here are a few common > invalid URLs and how they are parsed: ...

« previous php.bugs (#240975) next »