Re: [apps-discuss] Scope of RFC3986 and successor - what is a URI?

Dave Cridland <dave@cridland.net> Thu, 15 January 2015 17:19 UTC

Return-Path: <dave@cridland.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9D59F1B2E60 for <apps-discuss@ietfa.amsl.com>; Thu, 15 Jan 2015 09:19:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.378
X-Spam-Level:
X-Spam-Status: No, score=-1.378 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v4zkaeLjs7PI for <apps-discuss@ietfa.amsl.com>; Thu, 15 Jan 2015 09:19:33 -0800 (PST)
Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 770561B2E33 for <apps-discuss@ietf.org>; Thu, 15 Jan 2015 09:19:33 -0800 (PST)
Received: by mail-oi0-f46.google.com with SMTP id a3so13389831oib.5 for <apps-discuss@ietf.org>; Thu, 15 Jan 2015 09:19:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cridland.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3j3C5TnYaRHyezAKSyHC0+B7HGBoWlSHuM/MMBRSYTY=; b=DCTIPQfvOt2HVKkBt5zBCj2SejFzAF70YDo0sH38FslaZsToAI57dODgtS4maAPnx2 vDSmRStf7+gB8K6JUCK5UGpFYv01x6SKQr8bGgyhxUofIBoBakbYfIa6ORiD4bhJDsSU apA2BjjwUBuaZuDEqHncaD2rmBanG+9hkuec8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3j3C5TnYaRHyezAKSyHC0+B7HGBoWlSHuM/MMBRSYTY=; b=QJ9EbslwotgRwzvpuG9/wimtXg8viQGP0Ar5geZi/KiQFDmr56EtOQ6m9u1ezoRcyL nrQTiytVwYLrPniCkgVu7K3KD8TPAromoE8YxC5mNaOOFaGsisITKwueZX2qRs6DgJz7 3NLMrDDMvO9VXv2UUu67iEiF6FfAd5h+9KqOwbtBIFzrlROUG4OUmTLtGalY8laQcTu0 L9HAbQsA4bwLy+ZgiklBKCQHbGxxQTwntBVrAxBini/LZE+c7B6hTHYkF14HN4MChZ+0 R6mileIfTFpsWT8Qcef9C5bpgqTgpf5dow0BtX9pxeJwfIk7CiLPcEOxxpLWPU+J649O O2Pw==
X-Gm-Message-State: ALoCoQmzbqlsoojO3EYtnK9PSQGWFFZSPK1nrg0s3Fngn9hK82n6jYlLme5RXVa2AhLBZ+86XIy0
MIME-Version: 1.0
X-Received: by 10.202.1.200 with SMTP id 191mr6237688oib.31.1421342372685; Thu, 15 Jan 2015 09:19:32 -0800 (PST)
Received: by 10.60.84.171 with HTTP; Thu, 15 Jan 2015 09:19:32 -0800 (PST)
In-Reply-To: <54B7ED13.8020709@intertwingly.net>
References: <20140926010029.26660.82167.idtracker@ietfa.amsl.com> <54A94109.5010901@intertwingly.net> <00cf01d02cc7$d5dba4c0$4001a8c0@gateway.2wire.net> <54B16C2B.9050604@seantek.com> <54B17BBE.4000900@intertwingly.net> <54B18B61.8010308@seantek.com> <54B19435.8070401@intertwingly.net> <54B1B211.3050807@seantek.com> <54B1B682.3070609@intertwingly.net> <012001d02d91$6ec42300$4001a8c0@gateway.2wire.net> <54B2781C.4040505@intertwingly.net> <018e01d02dc6$1d03b0a0$4001a8c0@gateway.2wire.net> <54B2CC75.5080900@intertwingly.net> <54B79930.3070009@ninebynine.org> <54B7AEC2.9010109@intertwingly.net> <CAKHUCzz=jZAF-i2_pwGpkER5vNhv95CMwdBCMwigPJ0FA_t4_A@mail.gmail.com> <54B7BD4A.1090803@intertwingly.net> <f5ba91kjdt0.fsf@troutbeck.inf.ed.ac.uk> <54B7D851.7060201@intertwingly.net> <CAKHUCzyvpHeZtuW9XUD1RP45KUC5t7UpVaMiOxUor_pw8RyYjw@mail.gmail.com> <54B7E00D.9040509@intertwingly.net> <CAKHUCzwKHA2Ws5r298OhWrXyNJLgOA6Zv9xMD9kkwiMjv6FHbw@mail.gmail.com> <54B7ED13.8020709@intertwingly.net>
Date: Thu, 15 Jan 2015 17:19:32 +0000
Message-ID: <CAKHUCzy-R_DfXAvnarN1tRm9PHJUBA_FrGk7DpnDAJRcAC82bg@mail.gmail.com>
From: Dave Cridland <dave@cridland.net>
To: Sam Ruby <rubys@intertwingly.net>
Content-Type: multipart/alternative; boundary="001a1137dd103a8184050cb40fb8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/x_5Mr_n5MCcvd3SMNmv7RYUva-A>
Cc: Graham Klyne <gk@ninebynine.org>, "apps-discuss@ietf.org" <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Scope of RFC3986 and successor - what is a URI?
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Jan 2015 17:19:36 -0000

On 15 January 2015 at 16:38, Sam Ruby <rubys@intertwingly.net> wrote:

> On 01/15/2015 11:16 AM, Dave Cridland wrote:
>
>>
>>     Can you point out where in the IRI specification it says that '[' is
>>     a valid character to include in a query?
>>
>>     Julian has agreed[1] that "If an example of a problem I'm facing is
>>     that escaping square brackets in query/search strings causes
>>     problems, I'm not likely to find the solution to that problem in
>> IRIs."
>>
>> *sigh*
>>
>> One argument at a time. I've already stated that I do not have any
>> problem in principle with changing the rules on reserved characters in
>> queries in this respect; moreover I'd be fine with "[]" in a number of
>> places. It makes the specification slightly more complex, but I can live
>> with that.
>>
>
> So discussing how to change RFC 3986 to better match what is commonly
> deployed is indeed a possibility.
>
>
You would need to, I think, change both RFC 3986 and RFC 3987, but no,
there's no fundamental objection from me. Discarding them both out of hand
would, I think, be a serious mistake, as would using specific localized
problems to declare them entirely irrelevant.


>  With respect to having non-ASCII characters in fragments (or anywhere
>> else), can you *please* read the IRI spec and consider how that
>> satisfies (or fails to satisfy) your requirements?
>>
>
> I'm not personally convinced that layering URLs on top of IRIs which, in
> turn is layered on top of URIs solve more problems than it introduces. In
> addition, it clearly doesn't solve the problem mentioned above.
>
>
Multiple layers do actually solve problems.

But I don't think you need to.

I think that - while there's tweaks to the specification that can (and
perhaps should) be made, IRIs fit your essential requirements for syntax.
That is, you can, more or less, ignore URIs, and concentrate on IRIs for
parsing purposes. Then you add a "toASCII" operation on your object, and
you're done.

Parsing them consistently, especially for some error cases, is a different
matter, and something a new W3C/WHATWG spec can usefully address.

Put another way your "URLs" - and really, it'd be much easier if we could
at least agree to use the existing terminology - are essentially IRIs.


>  OK, I'll trust you that they don't parse only entirely valid IRIs. But
>> modulo the odd reserved character not being %-encoded, I'm pretty sure
>> they're the same.
>>
>
> Given that IRIs are a superset of URIs, and there are demonstrable
> differences between how such parsers handle even pure ASCII strings, then
> the claim that they are the same are IRIs is clearly not true.
>
>
"modulo the odd reserved character not being %-encoded", I said.

If there's other differences, you've not mentioned them, and I've yet to
see them.


>  The reason I'm claiming that "URL parsers" are in fact aiming to parse
>> IRIs is because they are, in general, aiming to parse "things that live
>> in HREF attributes" - and these are IRIs and IRI relative-references as
>> far as I can tell, so naturally the parsers have gravitated to that (if
>> not by observation of the specifications).
>>
>
> If what you are saying is that they both attempt to achieve the same goal,
> then I will agree.  The recommendation I got from IETF area directors, W3C
> tag members, and liaisons was to propose URL as a replacement for RFC 3987.
>
> https://lists.w3.org/Archives/Public/public-whatwg-archive/
> 2014Nov/0000.html
>
>
Which Area Directors? I honestly don't recall this being raised before, and
I find it surprising it went unremarked.


>      My goal is to work with authors of such parsers to remove as much as
>>     I can from the right-most column of the following:
>>
>>     https://url.spec.whatwg.org/__interop/test-results/
>>     <https://url.spec.whatwg.org/interop/test-results/>
>>
>> That's a great goal.
>>
>
> Thanks!
>
>  By the way, when I switch to "conforming URLs", I see nothing there on
>> first glance that would appear to be an invalid IRI reference. I think
>> that's important. Also I think many of your "invalid URIs" are actually
>> valid. For example, I don't see why "http://www.example.com/foo/%2e" is
>> invalid; it's over-using %-encoding but that's legal if undesirable.
>>
>
> That is entirely intentional.  I have been working to make conforming URLs
> be a proper subset of valid IRIs, and where possible URIs. Allowing square
> brackets in query/search strings is an example where that isn't currently
> possible.
>
>
OK, but how do you know if they're conformant to the IRI spec if you don't
read it?


> As to valid URIs, I'm using the following code for validation:
>
> https://gist.github.com/think49/770087
>
> If you know of a better test I can perform (preferably in JavaScript so it
> can run in a browser), please let me know.
>
>
Huh. I don't immediately see why the example I gave isn't valid according
to that code either (unless it's case sensitivity in HEXDIGIT). I do see
the example I gave is valid according to RFC 3986, though.

I imagine you could persuade https://github.com/hildjj/node-abnf to run in
a browser, and avoid hand-crafted regexps.


>      If, in the process, I can come up with a definition that is either a
>>     proper superset or a proper subset of an existing RFC, that would be
>>     great.
>>
>> OK. I don't really see why you want to discard all existing RFCs and
>> write your own. But I'm pretty sure you're after 99% of IRI.
>>
>
> Please don't.  Strawmen on this list are getting rather tiring:
>
> https://yourlogicalfallacyis.com/strawman
>
>
That's not a strawman, it's hyperbole, but okay, I can play that game.

You're discarding RFC 3987 without even reading it, and your stated desire
is to discard RFC 3986, writing a new specification without reference.
That's neither hyperbole nor a strawman, that is genuinely what I
understand your goal to be.


> I am not discarding all existing RFCs.  Based on advice I have received to
> date from people I trust, I don't believe that IRIs solve the problems I'm
> trying to address.  Your cursory read of that spec hasn't changed my mind.
> Others have successfully dissuaded me from pursuing that goal further.
>
>
https://yourlogicalfallacyis.com/appeal-to-authority

So, you're being willfully ignorant, then, albeit on the poor advice of
others.

If your aim is to replace RFC 3987, you really need to read it and decide
for yourself on its own merits.

Speaking entirely personally, the thing that discomforts me about it is the
name. I can't ever think of typing an IRI into a web browser, despite the
fact that's exactly what I do.


> If people are amenable to discussing changes to RFC 3986, perhaps we could
> work together.
>
>          Dave.
>>
>
> - Sam Ruby
>