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

Mark Nottingham <mnot@mnot.net> Fri, 27 May 2011 03:36 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 []) by ietfa.amsl.com (Postfix) with ESMTP id B42A6E069D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 May 2011 20:36:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.791
X-Spam-Status: No, score=-8.791 tagged_above=-999 required=5 tests=[AWL=1.808, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id vEbMBTFs5Nwm for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 May 2011 20:36:06 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org []) by ietfa.amsl.com (Postfix) with ESMTP id 70E4EE064E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 26 May 2011 20:36:05 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1QPnp6-0002CU-HU for ietf-http-wg-dist@listhub.w3.org; Fri, 27 May 2011 03:34:52 +0000
Received: from lisa.w3.org ([]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <mnot@mnot.net>) id 1QPnmx-000291-7a for ietf-http-wg@listhub.w3.org; Fri, 27 May 2011 03:32:39 +0000
Received: from mxout-08.mxes.net ([]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1QPnmv-0001FS-8U for ietf-http-wg@w3.org; Fri, 27 May 2011 03:32:38 +0000
Received: from chancetrain-lm.mnot.net (unknown []) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 9AEBE509EB; Thu, 26 May 2011 23:32:14 -0400 (EDT)
From: Mark Nottingham <mnot@mnot.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Fri, 27 May 2011 13:32:11 +1000
To: httpbis Group <ietf-http-wg@w3.org>
Message-Id: <6A53E99A-019D-4F6D-A33D-24524CD34E17@mnot.net>
Mime-Version: 1.0 (Apple Message framework v1084)
X-Mailer: Apple Mail (2.1084)
Received-SPF: pass client-ip=; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1QPnmv-0001FS-8U 01b4606b64ce0ef60c2d2bc7c5ef67ae
X-Original-To: ietf-http-wg@w3.org
Subject: #295: Applying original fragment to "plain" redirected URI (also #43)
Archived-At: <http://www.w3.org/mid/6A53E99A-019D-4F6D-A33D-24524CD34E17@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/10565
X-Loop: ietf-http-wg@w3.org
Sender: ietf-http-wg-request@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: <E1QPnp6-0002CU-HU@frink.w3.org>
Resent-Date: Fri, 27 May 2011 03:34:52 +0000

New issue: <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/295>

As Eric Lawrence pointed out on his blog:

we don't define what happens when a request-URI has a fragment identifier and is redirected, but the Location header payload doesn't.

As mentioned in #43, an old I-D did specify behaviour here:


If the server returns a response code of 300 ("multiple choice"), 301 ("moved permanently"), 302 ("moved temporarily") or 303 ("see other"), and if the server also returns one or more URIs where the resource can be found, then the client SHOULD treat the new URIs as if the fragment identifier of the original URI was added at the end.

By my testing <https://gist.github.com/330963>*, IE (6 to 9)** and Safari do not apply the fragid (T4 and T8), whereas Opera, Chrome and Firefox do. If anyone has results from other implementations, they'd be most welcome.

I see two possible ways forward:
  1) As with #43, explicitly state that there isn't interop here.
  2) Define interop along the lines of draft-bos-http-redirect.

I realise that #2 would break some existing implementations, but I've seen evidence of some real interop pain here, and defining interop where the spec is cloudy *is* within our charter. 

However, I'd really like to hear from implementers as to whether they'd be willing to change their implementations before going down that path.

Regarding #43 <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/43>, my most recent testing indicates that, putting aside T4 and T8, there *is* interop on fragment combination for IE6-9, Safari 5, Chrome (current), FF4, FF3.6.15, FF3.0.11, and Opera 11.10.

This makes me wonder if we should, given this new information, re-open #43 and define precedence rules for fragment combination upon redirects. Thoughts? 


* Note that the "PASS/FAIL" terminology in those tests is misleading, as it assumes the semantics defined in draft-bos-http-redirect.

** IE 6-9 are interesting, in that the location bar URI does not reflect the fragment, nor is it available in JavaScript's location.hash; however the document *does* scroll to the appropriate place on the page when following the link.

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