Re: [apps-discuss] Retroactive application of draft-ietf-appsawg-uri-scheme-reg - comprehensive review

"Roy T. Fielding" <fielding@gbiv.com> Thu, 16 April 2015 17:58 UTC

Return-Path: <fielding@gbiv.com>
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 1A5761B33F7; Thu, 16 Apr 2015 10:58:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] 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 z6goc3Cxtuxs; Thu, 16 Apr 2015 10:58:18 -0700 (PDT)
Received: from homiemail-a29.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 858451B2E72; Thu, 16 Apr 2015 10:58:18 -0700 (PDT)
Received: from homiemail-a29.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a29.g.dreamhost.com (Postfix) with ESMTP id 3B12567406A; Thu, 16 Apr 2015 10:58:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=x8IAOqkuzyYTTWG93QaqdRiCw4g=; b=Iv6Gvcj4aljUxei6DJhaC/Mu3Ljl 4jZ9Mr9CWgISBxqZefff0D+B0bVl7pqTloEhV9k+5AQiSQrB95ciNGPrJ3+3OLvG w+xnlNt9xzSXeIbgAxif6MvH7p4u72xOYPNtnpGZ3qN5COgJinOyPaLDhPcJTvem sJe/799rY0hcVfc=
Received: from [192.168.1.18] (ip68-228-83-124.oc.oc.cox.net [68.228.83.124]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by homiemail-a29.g.dreamhost.com (Postfix) with ESMTPSA id 920CC6740C6; Thu, 16 Apr 2015 10:58:16 -0700 (PDT)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <46C605DB-0885-428F-90BD-C2988DA161DD@seantek.com>
Date: Thu, 16 Apr 2015 12:58:15 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <1F29A2BA-BC93-4BEC-A436-EFA97B951992@gbiv.com>
References: <2E49FA112B054FFAED69D8A1@JcK-HP8200.jck.com> <CALaySJ+JdE5YrBuXv343_CfNP4mYxOR94JV4q_Uso4VoWfD=Ng@mail.gmail.com> <723FBC93979E1019101319C5@JcK-HP8200.jck.com> <4EA0B2F8-5109-49EA-8BAF-0199D1640407@gbiv.com> <55274198.5030309@andyet.net> <CA288E99-DE72-4DCF-9BD5-822A9C8F41F9@gbiv.com> <CALaySJJZsCuQHUSMFULfH33ke63_Xrka8OMft2Dp0NPJNKLF5w@mail.gmail.com> <327268B5-3817-42F1-90B3-D44158B0AA5D@gbiv.com> <46C605DB-0885-428F-90BD-C2988DA161DD@seantek.com>
To: Sean Leonard <dev+ietf@seantek.com>
X-Mailer: Apple Mail (2.2098)
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/4_5uHQNVPbZy3sn13ySiDzDCsbg>
Cc: Barry Leiba <barryleiba@computer.org>, "draft-ietf-appsawg-uri-scheme-reg.all@ietf.org" <draft-ietf-appsawg-uri-scheme-reg.all@ietf.org>, IESG <iesg@ietf.org>, Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Retroactive application of draft-ietf-appsawg-uri-scheme-reg - comprehensive review
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, 16 Apr 2015 17:58:20 -0000

> On Apr 15, 2015, at 11:54 PM, Sean Leonard <dev+ietf@seantek.com> wrote:
> 
> On Apr 10, 2015, at 8:44 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
> 
>>> On Apr 10, 2015, at 8:38 AM, Barry Leiba <barryleiba@computer.org> wrote:
>>> 
>>>> No scheme can prohibit fragments. They are not part of the scheme's syntax.
>>> 
>>> We continue to have a confusion between syntax and semantics here.
>>> 
>>> I absolutely agree that no scheme can say that fragments are
>>> syntactically invalid, because the schemes do not control the syntax
>>> of a URI.
>>> 
>>> But a scheme can certainly say that fragments make no semantic sense
>>> within that scheme, and that if a URIs uses that scheme and contains a
>>> fragment, it is not a well formed URI within that scheme.
>> 
>> No, they can't, or at least they cannot say that truthfully.
>> 
>>> It's rather like saying that English words are composed of characters
>>> from the set "abcdefghijklmnopqrstuvwxyz", and, therefore, the string
>>> "qwx" is a valid piece of an English word (syntax)... but that, in
>>> fact, no valid English words contain "qwx" (semantics).
>> 
>> Sorry, you've lost me.
>> 
>> It is more like saying that, because host and port are adjacent to each other in
>> the syntax, it is therefore possible for DNS to specify what ports are allowed.
>> 
>>> That's not a layering violation at all -- it has to be up to the
>>> scheme to say what the semantic meaning of a fragment is within that
>>> scheme, or whether fragments have any meaning at all.
>> 
>> It has nothing to do with the scheme. Nothing whatsoever. It is true that there
>> are many resources, regardless of scheme, for which a fragment identifier wouldn't
>> have much practical purpose other than as a name, but that's only because
>> nobody has found a reason to resolve them yet. In most cases, this is because
>> deployment of the scheme is so small that it isn't worth anyone's bother to create
>> a gateway for information about its identified resources.
> 
> I agree with Barry.
> 
> The scheme transitively defines the semantic meaning of fragments because the scheme defines the kinds of resources (if any) that are identified by it. Those resources may or may not have Internet media types, and those resources may or may not assign semantic meanings to fragments.

You are confusing resources with representations.  Resources do not have media types,
though they might have representations that are consistently the same media type.
Resources don't even need to have representations.

Regardless, the scheme does not define the kinds of representations. It only defines the
rules for name allocation within a uniform syntax for that name.  What kinds of
representations are so named depends *entirely* on how the identifiers are used, not on
the scheme.  For example, a VIN (physical identifier assigned to a vehicle by its
manufacturer) is clearly intended to uniquely identify a car.  However, its primary
uses are to indirectly identify registration records, odometer readings, and insurance
policies.  If a urn namespace for vin is assigned and a urn:vin: is used in HTTP for a
GET of a representation, the response will not be a car.

> mailto: defines a URI scheme that does not identify representations of anything; it is used to launch a compose window to create new mail. (Arguably a mailto: URI identifies a mailbox.) Therefore fragment identifiers have no semantic meaning in mailto: because mailto: doesn’t use them.

Actually, what it identifies is a pre-defined template for an email message.
Fragment identifiers are rarely used here because implementations are inconsistent,
not because there is anything unusual about the scheme.  Note that mailto is *also*
used for other things, like mailbox identifiers, in which the context of use clearly
does not support the use of fragments (just like they don't support subject or body
definitions within query).  That's fine.

> [RFC6068] says:
>   Note that this specification, like any URI scheme specification, does
>   not define syntax or meaning of a fragment identifier (see [STD66]),
>   because these depend on the type of a retrieved representation.  In
>   the currently known usage scenarios, a 'mailto' URI cannot be used to
>   retrieve such representations.  Therefore, fragment identifiers are
>   meaningless, SHOULD NOT be used on 'mailto' URIs, and SHOULD be
>   ignored upon resolution.  The character "#" in <hfvalue>s MUST be
>   escaped as %23.

Obviously, that is a bug in that spec.  An errata should be attached to it.
For example,

   mailto:fielding@gbiv.com#cc

is a valid use of fragment for the mailto URI (it instructs the user agent to
place the input context on the cc field after presentation of the template).

> This text is entirely consistent with Barry’s point. The scheme may not define the semantics of the fragment directly, but it defines the resources (representations), which in turn define the fragments.

The text violates the requirements of STD66, the standard upon which it is
supposed to be entirely dependent.  It is an obvious bug,

> Sean
> 
> PS I could be wrong but [RFC3966] looks like it permits the # character in the tel: URI in the path part.

It does not.  Read the text around gen-delims in section 2.2.

....Roy