Re: NEW PREFERENCE - location

Matthew Bishop <matt@thebishops.org> Mon, 06 May 2019 19:04 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 191651200D6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 May 2019 12:04:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.898
X-Spam-Level:
X-Spam-Status: No, score=-2.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=thebishops-org.20150623.gappssmtp.com
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 AMDrqPz8XVqc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 May 2019 12:04:54 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F25F1120047 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 6 May 2019 12:04:53 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hNisj-0005zz-6s for ietf-http-wg-dist@listhub.w3.org; Mon, 06 May 2019 19:02:33 +0000
Resent-Date: Mon, 06 May 2019 19:02:33 +0000
Resent-Message-Id: <E1hNisj-0005zz-6s@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <matt@thebishops.org>) id 1hNisg-0005zE-Cm for ietf-http-wg@listhub.w3.org; Mon, 06 May 2019 19:02:30 +0000
Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <matt@thebishops.org>) id 1hNise-0006OW-Cu for ietf-http-wg@w3.org; Mon, 06 May 2019 19:02:29 +0000
Received: by mail-lj1-x22b.google.com with SMTP id d15so12051868ljc.7 for <ietf-http-wg@w3.org>; Mon, 06 May 2019 12:02:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thebishops-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6as3MDqC6+n2g6p80EVFTsfKRI/PX6kutNfWW7ZTQLs=; b=qn6RbiCpdP/ucOOABiXVmNOHhClacdOdYw4MaAZ+fkhpSPl2iPrVQROgPPFKg7dkyA k90N5XdhBUg+TV2r8rpWQV3Y3cE8IfEQKKxItlp24b4QdVpq/F/cP0bokZ5JBMUQXzbk 02lWJEaxTjbcUxY/X5WsynWJZWS4qA/576gtUK0Hlegv9uvfbxnwwX846ZKW4naWgIiN HwlSZnPtH6B3lXZ795ObYh2yk0N4HAyF1aMf8tnaXb/tMssY8HQfc7XC+FK3b3gsx460 Ls9ef0TkticFLGqoYTArn9hJrZge4X1tbRswuW3bq9msLDjXir8O2ckPcVCTBtWiT7NA ykNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6as3MDqC6+n2g6p80EVFTsfKRI/PX6kutNfWW7ZTQLs=; b=J5gRqW3yIVAgjOmVi1gLrPC4+z1UQaAhV10d9rVtukapcQPFm9rbj5J0nG9a9P0lOd NFrDLv6okaAtbivNJBfhdhN4i+Y4IJNESGJOdaPRxN34ohux+ZsQXn6H0hlWZf1JaASi 4HiJeZ/kRzCUdQlImjwIdpafpVXxxYb47GChetgCkHcOnjrEEkjV/6fguv2VZSsZ1dM2 52iJBHD7hiE1JlD52QrUqQXzibc7jP6UoNrt2K9E39G7HPDmk78sP1yauIPEhUsFrtRB XjFQzOyljqBEERujwwmrOYISyNUn5Ps/HbWYLg8ptlEh1LYkuZISmGj7yqG7arI4Zi+e rrCQ==
X-Gm-Message-State: APjAAAWxseC+klHkuX9lGogffHwKVkKEoMFd2NdDyCO0nuckFTCMwta1 K4e9hqoAS00lPuZ6/ecq14mYJtUxOpUcTJcPTOFAVOoX7QqEuw==
X-Google-Smtp-Source: APXvYqxZM7TZLendEwGNzBYGhLoHddcMIBjNG9fCmb8vZhEeAtJk5eG3fmxqcU12s7aMIFVjPT751hzHXuX6D5V9PAM=
X-Received: by 2002:a2e:8787:: with SMTP id n7mr14593584lji.31.1557169326659; Mon, 06 May 2019 12:02:06 -0700 (PDT)
MIME-Version: 1.0
References: <CAEvuJbZN9abyEQTnnHEi9vnPXhdCTSQbvz7_MORgn+6H6gd7Sg@mail.gmail.com> <CAOdDvNrotbuXOMRr-eM0cUWYYiKrk0409rX1vE9OXg+ZVfGtMw@mail.gmail.com>
In-Reply-To: <CAOdDvNrotbuXOMRr-eM0cUWYYiKrk0409rX1vE9OXg+ZVfGtMw@mail.gmail.com>
From: Matthew Bishop <matt@thebishops.org>
Date: Mon, 06 May 2019 12:01:55 -0700
Message-ID: <CAEvuJbYrx+rGNG1C8zJaOgFJaFyoAQeJqiqHXQvRJHhgz3uQbQ@mail.gmail.com>
To: Patrick McManus <mcmanus@ducksong.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000009233cd05883cbc09"
Received-SPF: none client-ip=2a00:1450:4864:20::22b; envelope-from=matt@thebishops.org; helo=mail-lj1-x22b.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1hNise-0006OW-Cu 8a362e2f748e2f6e18d4ddb717458ac5
X-Original-To: ietf-http-wg@w3.org
Subject: Re: NEW PREFERENCE - location
Archived-At: <https://www.w3.org/mid/CAEvuJbYrx+rGNG1C8zJaOgFJaFyoAQeJqiqHXQvRJHhgz3uQbQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36613
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Mark, I misunderstood the submission policy at
https://tools.ietf.org/html/rfc7240#section-5.1 to mean a specification had
to be referenced. I see now that a specification has to be submitted with
the completed preference template therein. I will write up a specification
submission for this preference.

Patrick, this preference is based on experience and common best practices
for handling POST requests from the client. An API that accepts POSTs will
usually return a 201 Created with a Location, but I have found that clients
actually want to specify that a 303 See Other is returned so their client
can redirect to the Location URL and save them the coding process of
directly fetching the Location resource in client code.

This preference is similar to the "return=representation" preference except
that the client wants an actual redirect to occur to run the second fetch
through the caching mechanisms. The resource at Location may already be
cached.

Does an exact implementation need to exist first? I was thinking of using
the preference beforehand but thought that was not appropriate.

On Mon, May 6, 2019 at 7:09 AM Patrick McManus <mcmanus@ducksong.com> wrote:

> Hello Matt,
>
> In addition to Mark's advice, can you help the group understand the scope
> of this mail?
>
> Is it proposed based on experience or an idea? Are there interoperable
> implementations yet?  In what instance would you expect stay to be used?
> Why would this be a client side preference?
>
> Thanks!
>
>
> On Sun, May 5, 2019 at 11:19 AM Matthew Bishop <matt@thebishops.org>
> wrote:
>
>> o  Preference: location
>>
>> o  Value: One of either "redirect" or "stay"
>>
>> o  Description: In state change requests, the client prefers the server
>> to return either a
>>       redirect status code or a 2xx status code when a response contains
>> a Location
>>       header. The value "redirect" indicates a 303 See Other should be
>> returned. The value
>>       "stay" indicates an appropriate 2xx status should be returned.
>>
>> o  Reference: HTTP/1.1: Semantics and Content, section 4.4.4 303 See Other
>>       [https://tools.ietf.org/html/rfc7231#section-6.4.4]
>>
>> o  Notes: This preference is intended to be used with HTTP methods that
>> return a Location
>>       header and either a 303 or a 2xx status code.
>>
>>       This preference supports the Post/Redirect/Get pattern. Wikipedia's
>> entry for this
>>       pattern explains it's value in client interactions. See
>>       https://en.wikipedia.org/wiki/Post/Redirect/Get for details.
>>
>