On 02/04/2025 19:59, Máté Kocsis wrote:
Hi Ignace,
I spotted another inconsistency in the normalization under RFC3986
Thanks for spotting this: apparently, it is due to a small bug in the
uriparser library, which I managed to fix locally, PR is on its way to
upstream.
Máté
Hi Máté I have a couple of questions regarding RFC3986\Uri
- I believe during normalization of IPv6 host the letter a-f should be
lowercase in accordance with the RFC since
RFC3986 follows https://www.rfc-editor.org/rfc/rfc3513 which has been
replaced by https://www.rfc-editor.org/rfc/rfc4291 which is updated by
https://www.rfc-editor.org/rfc/rfc5952#section-4.3 which recommends
lowecasing the letters. (yeah that was quite a digging I know 🙂 )
- Since the withers expect well encoded components does it means that it
is the same for the constructor. What is
the expected result for the following code ?
```php
$uri =new Uri\Rfc3986\Uri("https://example,com/?foo[]=1&foo[]=2");
```
Should the above trigger an exception because the query component contain
invalid characters or
is it acceptable ? Asking because currently our dear old parse_url does not
fail on this and
probably most PHP developers expect this not to fail.
IMHO I am in favor of it failing to get a consistent experience when using the
class because
otherwse you introduce an inconsistency between the constructor behaviour and
the rest of the class
API.
Best regards,
Ignace Nyamagana Butera