Re: Cacheability of 421 (Misdirected Request)

Mark Nottingham <mnot@mnot.net> Thu, 14 April 2016 02:42 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 6AE7912E647 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 13 Apr 2016 19:42:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.917
X-Spam-Level:
X-Spam-Status: No, score=-7.917 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 SI3WWgHHarQr for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 13 Apr 2016 19:42:44 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 349CC12E645 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 13 Apr 2016 19:42:44 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aqXAI-0004Uj-9y for ietf-http-wg-dist@listhub.w3.org; Thu, 14 Apr 2016 02:37:54 +0000
Resent-Date: Thu, 14 Apr 2016 02:37:54 +0000
Resent-Message-Id: <E1aqXAI-0004Uj-9y@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <mnot@mnot.net>) id 1aqXAC-0004Ty-Qf for ietf-http-wg@listhub.w3.org; Thu, 14 Apr 2016 02:37:48 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by lisa.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <mnot@mnot.net>) id 1aqXAB-0004bw-1G for ietf-http-wg@w3.org; Thu, 14 Apr 2016 02:37:48 +0000
Received: from [192.168.1.101] (unknown [120.149.194.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 273B222E257; Wed, 13 Apr 2016 22:37:21 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CALHHdhwPrpFRApRHAHufYBphBVX9NCc8HfxLEpnw6CGM+YBqOQ@mail.gmail.com>
Date: Thu, 14 Apr 2016 12:37:19 +1000
Cc: ietf-http-wg@w3.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E2C4E7E-5719-41F5-B50C-8EAFFE87D6BF@mnot.net>
References: <CALHHdhwPrpFRApRHAHufYBphBVX9NCc8HfxLEpnw6CGM+YBqOQ@mail.gmail.com>
To: Vasiliy Faronov <vfaronov@gmail.com>
X-Mailer: Apple Mail (2.3124)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-8.3
X-W3C-Hub-Spam-Report: AWL=1.317, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1aqXAB-0004bw-1G 8bed2a49d0ddae3a5c16053d87b2658a
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Cacheability of 421 (Misdirected Request)
Archived-At: <http://www.w3.org/mid/4E2C4E7E-5719-41F5-B50C-8EAFFE87D6BF@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31447
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>

Hi,

> On 11 Apr 2016, at 2:19 PM, Vasiliy Faronov <vfaronov@gmail.com> wrote:
> 
> Hi,
> 
> RFC 7540 Section 9.1.2 says that responses with status code 421
> (Misdirected Request) are cacheable by default. I think this is wrong.
> HTTP cache key is based on the request URI, so if a client were to
> cache a 421 response, it would then use this cached 421 to satisfy
> further requests to the same URI, before it has a chance to connect to
> the right server.
> 
> I think the paragraph about cacheability should be removed, so that
> the general "not by default" rule applies from RFC 7231 Section 6.1.
> Or maybe even rewritten to say "Responses with the 421 status code
> MUST NOT be stored by a cache," as in RFC 6585.

I can't find any evidence of this being discussed explicitly (the wording was included in the original draft as adopted by the WG), although I do remember it coming up somewhere. 

I agree that with many use cases, having 421 be cacheable by default isn't very helpful, although it's easy enough to assure that it isn't cached (e.g., with Cache-Control: no-store). 

Does anyone else remember some more context around this?


> Should I report an erratum, or am I missing something?

Changing the cache semantics of an existing status code isn't an erratum, no matter how inconvenient. I think the best we could do would be to hold it for update, and even then the most we might be able to do would be to caution people to add CC: no-store in the common case.

Cheers,



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