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

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:

http://intertwingly.net/projects/pegurl/url.html#setter-rules

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:

https://github.com/rubys/url/blob/peg.js/reference-implementation/test/urlsettest.yml

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:

http://intertwingly.net/projects/pegurl/liveview3.html

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