Re: p1: HTTP(S) URIs and fragment identifiers

"Martin J. Dürst" <duerst@it.aoyama.ac.jp> Mon, 22 April 2013 08:10 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 87DAD21F8C55 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 22 Apr 2013 01:10:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.299
X-Spam-Level:
X-Spam-Status: No, score=-10.299 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aJp9L5OzjI-n for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 22 Apr 2013 01:10:05 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id D449621F8BC0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 22 Apr 2013 01:10:04 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UUBoY-0001i0-Kr for ietf-http-wg-dist@listhub.w3.org; Mon, 22 Apr 2013 08:09:30 +0000
Resent-Date: Mon, 22 Apr 2013 08:09:30 +0000
Resent-Message-Id: <E1UUBoY-0001i0-Kr@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <duerst@it.aoyama.ac.jp>) id 1UUBoU-0001gz-5B for ietf-http-wg@listhub.w3.org; Mon, 22 Apr 2013 08:09:26 +0000
Received: from scintmta02.scbb.aoyama.ac.jp ([133.2.253.34]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <duerst@it.aoyama.ac.jp>) id 1UUBoR-0005BK-34 for ietf-http-wg@w3.org; Mon, 22 Apr 2013 08:09:26 +0000
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta02.scbb.aoyama.ac.jp (secret/secret) with SMTP id r3M88eKQ020225; Mon, 22 Apr 2013 17:08:40 +0900
Received: from (unknown [133.2.206.134]) by scmse02.scbb.aoyama.ac.jp with smtp id 24cd_5a35_d7b54836_ab23_11e2_beaf_001e6722eec2; Mon, 22 Apr 2013 17:08:40 +0900
Received: from [IPv6:::1] (unknown [133.2.210.1]) by itmail2.it.aoyama.ac.jp (Postfix) with ESMTP id 8A358BFBD3; Mon, 22 Apr 2013 17:08:17 +0900 (JST)
Message-ID: <5174EFFD.8000801@it.aoyama.ac.jp>
Date: Mon, 22 Apr 2013 17:08:29 +0900
From: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Zhong Yu <zhong.j.yu@gmail.com>
CC: Mark Nottingham <mnot@mnot.net>, Julian Reschke <julian.reschke@gmx.de>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
References: <EBBA02BC-CAAF-4CE3-807F-85D87A9D30C8@mnot.net> <517243A2.9000006@gmx.de> <AED6FBF2-724F-424B-AFC2-06A5C73F8B14@mnot.net> <51724CBB.6060300@gmx.de> <D323C524-1176-46FB-ABC7-727ECA6B2FB9@mnot.net> <CACuKZqG7-OBvECj8hc_usufixhUEH0ArAFANCiyOCP_eOUzZ2Q@mail.gmail.com>
In-Reply-To: <CACuKZqG7-OBvECj8hc_usufixhUEH0ArAFANCiyOCP_eOUzZ2Q@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: none client-ip=133.2.253.34; envelope-from=duerst@it.aoyama.ac.jp; helo=scintmta02.scbb.aoyama.ac.jp
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: AWL=-2.271, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UUBoR-0005BK-34 07881b06aaf75d625b3a1ca2c3076c7d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: p1: HTTP(S) URIs and fragment identifiers
Archived-At: <http://www.w3.org/mid/5174EFFD.8000801@it.aoyama.ac.jp>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17465
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 2013/04/21 1:39, Zhong Yu wrote:
> I like Mark's idea better. In many contexts when people use the term
> HTTP URI they would consider fragment a legit optional part, so the
> spec should not appear to exclude it in general.

This problem was detected for the general case by IRI WG last summer. 
Please see: http://trac.tools.ietf.org/wg/iri/trac/ticket/126.

The IRI WG is now closed, and it is unclear when or whether any of the 
work will be continued/completed. But this is a clear issue that those 
defining URI schemes (anew as the text in the tracker assumes, or also 
just as a spec update as for http and https) have to understand and deal 
with.

 From that issue:

 > 1) Fragment identifiers are part of URIs, and scheme definitions
 > cannot and MUST NOT disallow fragments on specific schemes (even if
 > the usability of a fragment id on the particular scheme being defined
 > seems questionable at the time the scheme definition is made).

 > 2) Fragment identifiers are independent of schemes, depending on MIME
 > media types, and therefore scheme definitions cannot define anything
 > about fragment identifiers.


> On Sat, Apr 20, 2013 at 3:16 AM, Mark Nottingham<mnot@mnot.net>  wrote:
>>
>> On 20/04/2013, at 6:07 PM, Julian Reschke<julian.reschke@gmx.de>  wrote:
>>
>>> On 2013-04-20 09:30, Mark Nottingham wrote:
>>>>
>>>> On 20/04/2013, at 5:28 PM, Julian Reschke<julian.reschke@gmx.de>  wrote:
>>>>
>>>>> On 2013-04-20 06:07, Mark Nottingham wrote:
>>>>>> P1 sections 2.7.1 and 2.7.2 define the HTTP and HTTPS URI schemes without fragment identifiers.
>>>>>>
>>>>>> While it's true that HTTP sends these URIs without fragids "on the wire" in the request-target, the schemes *do* allow fragids pretty much everywhere else they're used (including some places in HTTP, e.g., the Location header).
>>>>>>
>>>>>> Given that this is going to be the definition for these URI schemes, and we already require that the fragid be omitted in the request-target, shouldn't the syntax allow a fragment identifier?
>>>>>
>>>>> No.
>>>>>
>>>>> Fragment identifiers are allowed for *any* URI scheme; the scheme definition doesn't need to include it.
>>>>
>>>>
>>>> Then why do we include query?
>>>
>>> Because we are defining a<http://greenbytes.de/tech/webdav/rfc3986.html#absolute-uri>.

Because the query is scheme-specific. For people who mostly work with 
HTTP, the query part seem like a sure thing, but there are many schemes 
where query parts are not allowed, and others where query parts have 
very specific protocol implications (e.g. mailto:), whereas in HTTP, 
it's pretty much just "something sent to the server", and details are 
left to client and server internals.


>> But this section *isn't* defining just a single protocol element; it's defining the form of HTTP URIs.
>>
>> I suspect the right thing to do here is to specify that HTTP(s) URIs use the path-abempty form of the hier-part, give some examples, and leave the rest of the ABNF to RFC3986 (or its successors).

That's one way to do it. And of course it has to say that the <scheme> 
part is "http" for http URIs and "https" for https URIs. That's pretty 
obvious to everybody, but we are writing the spec that's nailing this down.

Another alternative is to say that the http-URI and https-URI 
productions correspond to (are concretizations of) the absolute-URI 
production in RFC 3986.

Another solution is to just leave the current text.

But in any of the three above cases (and in particular in the last one), 
it might be very helpful to add a note that of course these schemes can 
take fragments, and point to 
http://tools.ietf.org/html/rfc3986#section-3.5 for details.


If the fragment part is included, then it would be better to rename the 
productions to something like http-URI-reference and 
https-URI-reference, and say that they correspond to URI-reference in 
RFC 3986.


>> At any rate, I don't see the http-uri or https-uri rules actually used anywhere normatively,

Do you mean inside the HTTP spec suite, or have you checked other specs? 
If not the productions then the actual syntax is used VERY widely.

Regards,   Martin.


>> so I *think* this is editorial. I.e., it's on your conscience :)
>>
>> Cheers,
>>
>>
>> --
>> Mark Nottingham   http://www.mnot.net/
>>
>>
>>
>>
>
>