Re: anchor parameter - LC comment on draft-nottingham-http-link-header-07.txt

Mark Nottingham <mnot@mnot.net> Fri, 19 February 2010 02:02 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: apps-discuss@core3.amsl.com
Delivered-To: apps-discuss@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 1A79C28C1A6 for <apps-discuss@core3.amsl.com>; Thu, 18 Feb 2010 18:02:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.901
X-Spam-Level:
X-Spam-Status: No, score=-3.901 tagged_above=-999 required=5 tests=[AWL=-1.302, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BXTeWqq2cmaM for <apps-discuss@core3.amsl.com>; Thu, 18 Feb 2010 18:02:22 -0800 (PST)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) by core3.amsl.com (Postfix) with ESMTP id 7659128C182 for <discuss@apps.ietf.org>; Thu, 18 Feb 2010 18:02:22 -0800 (PST)
Received: from chancetrain-lm.mnot.net (unknown [118.209.189.113]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9033E509DD; Thu, 18 Feb 2010 21:03:59 -0500 (EST)
Subject: Re: anchor parameter - LC comment on draft-nottingham-http-link-header-07.txt
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset="us-ascii"
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <4B6C1144.4090502@gmx.de>
Date: Fri, 19 Feb 2010 13:03:54 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <5C1BFD92-7E8D-4ABF-A986-03ADC50A18CD@mnot.net>
References: <20100119053002.5CD613A683B@core3.amsl.com> <E4FF7733-D744-4AC3-AB99-66A12868E4CE@mnot.net> <4B56E27D.800@gmx.de> <4B584E46.7000405@gmx.de> <2C94E45E-3373-4694-BFA3-FA7B595EAF65@mnot.net> <4B596450.7020001@gmx.de> <F1BF65AA-AE8F-435D-9097-AD629488E134@mnot.net> <4B62D875.102@gmx.de> <7B248F44-44D9-4054-84A2-E9C4C5C251E1@mnot.net> <4B6C1144.4090502@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1077)
Cc: Apps Discuss <discuss@apps.ietf.org>, HTTP Working Group <ietf-http-wg@w3.org>
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Fri, 19 Feb 2010 02:02:24 -0000

OLD:
  The anchor parameter MUST be ignored by consuming implementations, unless its use is specified by the application in use.

NEW:
  Links with the anchor parameter MUST be ignored by consuming implementations, unless its use is specified by the application and/or relation type in use.

works?



On 05/02/2010, at 11:38 PM, Julian Reschke wrote:

> Mark Nottingham wrote:
>> On 29/01/2010, at 11:45 PM, Julian Reschke wrote:
>>> Mark Nottingham wrote:
>>>> ...
>>>> If that's the case, you're saying that whether the anchor is allowed is really a property of the relation type, not the application, aren't you? ...
>>> First of all, I'd prefer to distinguish between (A) "must be processed" and (B) "may be processed, otherwise link must be rejected altogether".
>>> 
>>> I see two purposes for the anchor parameter:
>>> 
>>> 1) Making a statement about a subset of the context resource, by specifying a fragment identifier
>>> 
>>> 2) Making a statement about a different resource than the context resource, such as
>>> 
>>> 2a) because the context is anonymous (such as the response body for a 204, see <http://greenbytes.de/tech/webdav/draft-brown-versioning-link-relations-07.html#rfc.section.A.1>), or
>>> 
>>> 2b) because a reverse link is exposed (anchor as workaround for missing rev parameter)
>>> 
>>> I'm still not sure why we would ever make special cases here, except for the known bugs in current implementations of the Link header where anchor is ignored (so mainly Mozilla/Opera for stylesheet links). Optimally, we just work with the vendors to get the bugs fixed.
>>> 
>>> If that's not possible, allowing an opt-out per relation type might work, as long as behavior (B) would still be allowed. Is there any relation != "stylesheet" for which this would be relevant?
>> I think most of them.
>> E.g., what happens when my weblog
>>  http://www.mnot.net/blog/
>> contains a link header
>>  Link: </blog-publish>; rel="service"; anchor="http://www.intertwingly.net/blog/"
>> ?
>> After Sam visits my blog, should his browser (assuming it supports Atompub) use my site for editing next time he wants to post something?
> 
> That's an excellent example. I do agree that - in general - we don't want <http://www.mnot.net/blog/> to be able to affect <http://www.intertwingly.net/blog/>.
> 
> So the choices here are:
> 
> a) Processing anchor, detecting the authority conflict, and ignoring the link, or
> 
> b) ignoring anchor, and pretending we have <http://www.mnot.net/blog/> --service--> <http://www.mnot.net/blog/blog-publish>
> 
> What I'm trying to say is that we never ever want b).
> 
> So I'm fine with clients ignoring the link header altogether because it contains anchor, but simply ignoring the anchor parameter, but processing the rest seems to be a very bad idea.
> 
>> Likewise, what happens after I put this link header in all of my responses?
>>  Link: <http://www.yahoo.com/>; rel="self"; anchor="http://www.google.com/"
>> ?
>> Or better yet:
>>  Link: <http://www.mybank.com.au/mnot>; rel="payment"; anchor="http://www.amazon.com/"
>> While it may be that browsers in general won't "remember" this information, that doesn't mean that we should specify things so that they're encouraged to handle these things, knowing full well that they won't. Opt-in seems much more sane that opt-out here, at least for different resources.
> 
> Well, maybe we've been agreeing all the time, and just the spec text needs tuning.
> 
> So again: a recipient MUST resolve the anchor parameter against the context IRI (*), producing a new context. It MAY ignore the link if the resulting context looks suspicious (maybe something like same-domain could be recommended here).
> 
> Best regards, Julian
> 
> (*) + handle the case where there's no context IRI


--
Mark Nottingham     http://www.mnot.net/