Hi Maté

I see you updated the RFC but I believe there's still some errors in the
example:

$url = Uri\WhatWg\Url::parse("/foo", ".com");                 //
Throws Uri\WhatWg\InvalidUrlException because of $baseUri

Since parse is used shouldn't it return null instead of throwing ?

$uri = 
Uri\Rfc3986\Uri::parse("https://%e4%bd%a0%e5%a5%bd%e4%bd%a0%e5%a5%bd.com";);
// percent-encoded form of https://你好你好.com
<https://xn--6qqa088eba.com>echo $uri->toString();
        // https://%e4%bd%a0%e5%a5%bd%e4%bd%a0%e5%a5%bd.com

RFC3986 host normalization states that URL encoded part should be encoded
using uppercased letter so on normalization:

https://%e4%bd%a0%e5%a5%bd%e4%bd%a0%e5%a5%bd.com should be
https://%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD.com

I updated my polyfill to reflect the latest changes in the RFC

Reply via email to