Re: [apps-discuss] Review of draft-ietf-appsawg-file-scheme

Graham Klyne <gk@ninebynine.org> Wed, 13 April 2016 10:59 UTC

Return-Path: <gk@ninebynine.org>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3E63D12D597; Wed, 13 Apr 2016 03:59:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.22
X-Spam-Level:
X-Spam-Status: No, score=-4.22 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=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 as8PN5iFr5FQ; Wed, 13 Apr 2016 03:59:13 -0700 (PDT)
Received: from relay12.mail.ox.ac.uk (relay12.mail.ox.ac.uk [129.67.1.163]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C3A5412D0F2; Wed, 13 Apr 2016 03:59:12 -0700 (PDT)
Received: from smtp4.mail.ox.ac.uk ([129.67.1.207]) by relay12.mail.ox.ac.uk with esmtp (Exim 4.80) (envelope-from <gk@ninebynine.org>) id 1aqIVo-0002zT-f3; Wed, 13 Apr 2016 11:59:08 +0100
Received: from modemcable171.142-37-24.static.videotron.ca ([24.37.142.171] helo=[192.168.55.103]) by smtp4.mail.ox.ac.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <gk@ninebynine.org>) id 1aqIVo-00076r-E4; Wed, 13 Apr 2016 11:59:08 +0100
Message-ID: <570E267A.2070801@ninebynine.org>
Date: Wed, 13 Apr 2016 11:59:06 +0100
From: Graham Klyne <gk@ninebynine.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: Matthew Kerwin <matthew@kerwin.net.au>, Dave Crocker <dcrocker@bbiw.net>
References: <570D4C99.1030405@dcrocker.net> <CACweHND-OX+5okkJ+oE=6UN84x+CFtPBpMnU8HqaPbgQgJ_oWA@mail.gmail.com>
In-Reply-To: <CACweHND-OX+5okkJ+oE=6UN84x+CFtPBpMnU8HqaPbgQgJ_oWA@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Oxford-Username: zool0635
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/l8M0AO-FGzGus_VtlKVj608m754>
Cc: draft-ietf-appsawg-file-scheme@ietf.org, Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Review of draft-ietf-appsawg-file-scheme
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 13 Apr 2016 10:59:14 -0000

On 13/04/2016 09:28, Matthew Kerwin wrote:
>>         2.  Append the transformed segment and a delimiting slash
>>> >>            character "/" to the URI.
>>> >>
>>> >>    6.  If the path includes a file name:
>>> >>
>>> >>        1.  Transform the file name to a path segment as above.
>>> >>
>>> >>        2.  Append the transformed segment to the URI.
>>> >>
>> >
>> >A slash is required at the end of a directory, even if there is no file
>> >name?
>> >
>> >
> If you're using it as a directory then yes. If you're using it as the
> ultimate object (the "file") then no. We defined "file" as an "object" in
> the file system earlier, which (going with the UNIX interpretation that
> everything is a file) can include directories. As far as I know most
> non-UNIXy systems around today can deal with this interpretation too.
> Should I spell it out, or leave it up to interpretation?
>

I'd also say "yes".

This is an area where URI resolution works differently to file path resolution 
(on some systems), so it's not just an academic point.

If you don't include the trailing "/" on a directory used as a base URI, then 
the final directory segment gets dropped when performing URI resolution.

Developers working in this space will know this anyway, but I think it's important.

Also, "file:///home/user" and "file:///home/user/" are different URIs per 
RFC3986.  It's usially a good idea to avoid gratuitous URI aliasing, which 
suggests it would be good practice to always include the trailing "/".

#g
--