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

Julian Reschke <julian.reschke@gmx.de> Wed, 04 January 2012 11: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 2D4F621F8688 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 Jan 2012 03:10:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.632
X-Spam-Level:
X-Spam-Status: No, score=-5.632 tagged_above=-999 required=5 tests=[AWL=0.467, 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, 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 Sams54TnHZgG for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 Jan 2012 03:10:37 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 3FED921F8682 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 4 Jan 2012 03:10:10 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1RiOix-00007R-Jt for ietf-http-wg-dist@listhub.w3.org; Wed, 04 Jan 2012 11:09:39 +0000
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <julian.reschke@gmx.de>) id 1RiOiq-00006Z-Ua for ietf-http-wg@listhub.w3.org; Wed, 04 Jan 2012 11:09:32 +0000
Received: from mailout-de.gmx.net ([213.165.64.22]) by lisa.w3.org with smtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1RiOim-00063w-Al for ietf-http-wg@w3.org; Wed, 04 Jan 2012 11:09:30 +0000
Received: (qmail invoked by alias); 04 Jan 2012 10:42:22 -0000
Received: from p5DCC2CE1.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.44.225] by mail.gmx.net (mp014) with SMTP; 04 Jan 2012 11:42:22 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/kIVoVxUrklQqJqHXF4mU3iZcTgieOzfhJ6s8WfU uowsYioZcH6pu9
Message-ID: <4F042D08.7080503@gmx.de>
Date: Wed, 04 Jan 2012 11:42:16 +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: "\"Martin J. Dürst\"" <duerst@it.aoyama.ac.jp>
CC: httpbis Group <ietf-http-wg@w3.org>
References: <6A53E99A-019D-4F6D-A33D-24524CD34E17@mnot.net> <4EFDFA17.4080804@gmx.de> <4F031419.1050708@gmx.de> <4F0429A8.3090008@it.aoyama.ac.jp>
In-Reply-To: <4F0429A8.3090008@it.aoyama.ac.jp>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Received-SPF: pass client-ip=213.165.64.22; 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: lisa.w3.org 1RiOim-00063w-Al 2fe626124331842299741588a8819c83
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/4F042D08.7080503@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/11976
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: <E1RiOix-00007R-Jt@frink.w3.org>
Resent-Date: Wed, 04 Jan 2012 11:09:39 +0000

On 2012-01-04 11:27, "Martin J. Dürst" wrote:
> Hello Julian, others,
>
> On 2012/01/03 23:43, Julian Reschke wrote:
>> 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":
>
>> "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")?
>
> I'm not at all sure that this description is correct. It would mean that
> I can have something like:
> Request URI: http://1.example.org/path1/file1.ext
> Redirect URI: http://2.example.org#frag2
>
> and the result would be:
> http://2.example.org/path1/file1.ext#frag2
> ...

I think that's incorrect.

This should be resolved as per:

    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
       (left out)
    endif;

    T.fragment = R.fragment;

thus to

    http://2.example.org#frag2

Best regards, Julian