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

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

From: Sam Ruby <rubys@intertwingly.net>
Date: Wed, 29 Oct 2014 18:14:54 -0700
Message-ID: <5451910E.3010500@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/14 5:55 PM, Valentin Gosu wrote:
> On 30 October 2014 02:47, Sam Ruby <rubys@intertwingly.net
> <mailto:rubys@intertwingly.net>> wrote:
>
>     On 10/29/14 5:39 PM, Valentin Gosu wrote:
>
>         On 29 October 2014 15:34, Sam Ruby <rubys@intertwingly.net
>         <mailto:rubys@intertwingly.net>
>         <mailto:rubys@intertwingly.net
>         <mailto:rubys@intertwingly.net>__>> wrote:
>
>              On 10/29/14 6:09 AM, Valentin Gosu wrote:
>
>                  I think the content at
>         http://intertwingly.net/____projects/pegurl/url.html
>         <http://intertwingly.net/__projects/pegurl/url.html>
>                  <http://intertwingly.net/__projects/pegurl/url.html
>         <http://intertwingly.net/projects/pegurl/url.html>>
>                  would represent a nice addition to
>         https://url.spec.whatwg.org/, but
>                  can't really replace the parsing steps we already have.
>
>              Care to explain why?
>
>         Those steps represent an important reference for implementers,
>         handling
>         corner cases and parsing peculiarities that might not be obvious at
>         first glance.
>         While they're not crucial to the spec, they have been really
>         useful so
>         far, and I'd like them to continue being available.
>
>
>     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

Thanks!

Let me know if you spot anything else.

- Sam Ruby
Received on Thursday, 30 October 2014 01:15:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:44:35 UTC