W3C home > Mailing lists > Public > www-archive@w3.org > November 2014

Re: URL Spec rewrite (bug 25946) and galimatias test results

From: Sam Ruby <rubys@intertwingly.net>
Date: Sat, 22 Nov 2014 10:15:14 -0500
Message-ID: <5470A882.3080009@intertwingly.net>
To: Valentin Gosu <valentin.gosu@gmail.com>
CC: Anne van Kesteren <annevk@annevk.nl>, "www-archive@w3.org" <www-archive@w3.org>
On 10/29/2014 09:14 PM, Sam Ruby wrote:
> On 10/29/14 5:55 PM, Valentin Gosu wrote:
>> On 30 October 2014 02:47, Sam Ruby <rubys@intertwingly.net
>> <mailto:rubys@intertwingly.net>> wrote:
>>     My assertion is that the steps I have provided cover these exact
>>     same corner cases and parsing peculiarities, and I have running code
>>     and published test results to back up my assertion.  Can you
>>     identify a single corner case that isn't covered (other than the
>>     encoding changes that I already have noted as todos in the document)?
>> One I can think of is
>> var url = new URL("http://localhost/");
>> url.host = "example.com:1234#hello <http://example.com:1234#hello>"
>> //hostname = example.com <http://example.com>, port = 1234
>> or even
>> url.host = "example.com:abcd" // hostname = example.com
>> <http://example.com>, port = -1
>> The intertwingly implementation doesn't explicitly cover this case from
>> what I can tell (althought the end result might be the same).
> Todo added:
> https://github.com/rubys/url/commit/484bdec6a51ed7c7956f225ba5e8e28151ac1129

I've finally gotten around to implementing setters.  Early results are 
available here:


I'm surprised that some setters accept trailing garbage, some percent 
encode it, and some truncate it.  I hope that the proposed spec text 
makes this clearer.

I have an initial set of test cases:


Feel free to suggest more.

I've also produced a demo of a reference implementation that shows the 
rules defined by this spec in action, and compares it to what the 
browser does:


Future plans are to compare browser results against the spec and against 
each other.

- Sam Ruby
Received on Saturday, 22 November 2014 15:15:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:35:06 UTC