Re: #295: Applying original fragment to "plain" redirected URI (also #43)

Julian Reschke <julian.reschke@gmx.de> Tue, 03 January 2012 14:45 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 9DFA021F8521 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 3 Jan 2012 06:45:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.707
X-Spam-Level:
X-Spam-Status: No, score=-5.707 tagged_above=-999 required=5 tests=[AWL=0.692, BAYES_00=-2.599, J_CHICKENPOX_14=0.6, J_CHICKENPOX_15=0.6, J_CHICKENPOX_16=0.6, J_CHICKENPOX_17=0.6, J_CHICKENPOX_18=0.6, J_CHICKENPOX_19=0.6, J_CHICKENPOX_48=0.6, 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 XuaxYSz1VN2r for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 3 Jan 2012 06:45:20 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id D19AB21F851F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 3 Jan 2012 06:45:19 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Ri5b5-0003oE-TG for ietf-http-wg-dist@listhub.w3.org; Tue, 03 Jan 2012 14:44:15 +0000
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <julian.reschke@gmx.de>) id 1Ri5ay-0003mx-5t for ietf-http-wg@listhub.w3.org; Tue, 03 Jan 2012 14:44:08 +0000
Received: from mailout-de.gmx.net ([213.165.64.23]) by maggie.w3.org with smtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1Ri5aw-0007oL-IM for ietf-http-wg@w3.org; Tue, 03 Jan 2012 14:44:08 +0000
Received: (qmail invoked by alias); 03 Jan 2012 14:43:39 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp007) with SMTP; 03 Jan 2012 15:43:39 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18kNBVF9jIkGGRbsus+jwjWNY0s6Pn00wsuXfdI+B Cg6MGtnfUHVD0M
Message-ID: <4F031419.1050708@gmx.de>
Date: Tue, 03 Jan 2012 15:43:37 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: Mark Nottingham <mnot@mnot.net>
CC: httpbis Group <ietf-http-wg@w3.org>, Larry Masinter <masinter@adobe.com>
References: <6A53E99A-019D-4F6D-A33D-24524CD34E17@mnot.net> <4EFDFA17.4080804@gmx.de>
In-Reply-To: <4EFDFA17.4080804@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Received-SPF: pass client-ip=213.165.64.23; envelope-from=julian.reschke@gmx.de; helo=mailout-de.gmx.net
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Ri5aw-0007oL-IM 685da43bc47ca92f85f988c05c307b6c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: #295: Applying original fragment to "plain" redirected URI (also #43)
Archived-At: <http://www.w3.org/mid/4F031419.1050708@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/11960
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>
Resent-Message-Id: <E1Ri5b5-0003oE-TG@frink.w3.org>
Resent-Date: Tue, 03 Jan 2012 14:44:15 +0000

On 2011-12-30 18:51, Julian Reschke wrote:
> ...
> Indeed; see my tests at
> <http://greenbytes.de/tech/tc/httpredirects/#l-fragments> (note that
> Safari appears to have funny issues filling the iframes; but navigating
> to the linked resource gets you proper results).
> ...

I just realized that the rule we would need to describe *almost* is the 
one define in the URI spec 
(<http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.5.2>) as 
"relative resolution":

>    -- The URI reference is parsed into the five URI components
>    --
>    (R.scheme, R.authority, R.path, R.query, R.fragment) = parse(R);
>
>    -- A non-strict parser may ignore a scheme in the reference
>    -- if it is identical to the base URI's scheme.
>    --
>    if ((not strict) and (R.scheme == Base.scheme)) then
>       undefine(R.scheme);
>    endif;
>
>    if defined(R.scheme) then
>       T.scheme    = R.scheme;
>       T.authority = R.authority;
>       T.path      = remove_dot_segments(R.path);
>       T.query     = R.query;
>    else
>       if defined(R.authority) then
>          T.authority = R.authority;
>          T.path      = remove_dot_segments(R.path);
>          T.query     = R.query;
>       else
>          if (R.path == "") then
>             T.path = Base.path;
>             if defined(R.query) then
>                T.query = R.query;
>             else
>                T.query = Base.query;
>             endif;
>          else
>             if (R.path starts-with "/") then
>                T.path = remove_dot_segments(R.path);
>             else
>                T.path = merge(Base.path, R.path);
>                T.path = remove_dot_segments(T.path);
>             endif;
>             T.query = R.query;
>          endif;
>          T.authority = Base.authority;
>       endif;
>       T.scheme = Base.scheme;
>    endif;
>
>    T.fragment = R.fragment;

"Almost", because it doesn't use Base.fragment when R.frament is undefined.

a) Should we try describe the algorithm based on RFC 3986 ("do relative 
resolution as defined by ..., then, if the result doesn't have a 
fragment, add the one from the Base URI")?

b) Is this potentially an erratum for RFC 3986?

Best regards, Julian