Doc #60797 [Opn->Wfx]: parse_url fragments on #[0-9]+;
| From: | frozenfire@php.net | Date: | Tue, 24 Jan 2012 23:22:22 +0000 |
| Subject: | Doc #60797 [Opn->Wfx]: parse_url fragments on #[0-9]+; | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7856@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60797&edit=1
ID: 60797
Updated by: frozenfire@php.net
Reported by: buccinator at gmail dot com
Summary: parse_url fragments on #[0-9]+;
-Status: Open
+Status: Wont fix
Type: Documentation Problem
Package: URL related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Hash characters are not valid within a URL, except to delimit a fragment. RFC
1738 (http://www.ietf.org/rfc/rfc1738.txt) explicitly indicates under "2.2. URL
Character Encoding Issues" that the hash character *must* be encoded for the URL
to be valid.
The parse_url() reference indicates in several places that malformed URLs will
likely incur issues. As such, I don't feel it's warranted to document each way a
URL can be malformed.
Previous Comments:
------------------------------------------------------------------------
[2012-01-24 23:11:50] buccinator at gmail dot com
$url =
'http://example.com/key1=val1&key2=valsƈs&key3=vals&apos3;#fragment';
echo '<xmp>';
var_dump(parse_url($url));
echo '</xmp>';
actual output:
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "example.com"
["path"]=>
string(21) "/key1=val1&key2=vals&"
["fragment"]=>
string(31) "39;2s&key3=vals'3#fragment"
}
expected output (unless documented):
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "example.com"
["path"]=>
string(21) "/key1=val1&key2=vals'2s&key3=vals'3"
["fragment"]=>
string(31) "fragment"
}
------------------------------------------------------------------------
[2012-01-21 22:11:00] frozenfire@php.net
Could you please provide a test script showing the behaviour you're describing.
Based on what you've written, I do not know what needs to be documented.
------------------------------------------------------------------------
[2012-01-19 00:30:37] buccinator at gmail dot com
Description:
------------
note: parse_url() will fragment with #[0-9]+; type encodings within the query
Expected result:
----------------
that the filter be less greedy, or the function include this behaviour in the documentation
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60797&edit=1