Re: Should the HTTP Method change when following a 303 redirect ?

"Pof Magicfingers (Giovanni Olivera)" <pof@pof.pm> Wed, 22 April 2020 14:26 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 CAE5B3A0E50 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 Apr 2020 07:26:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.649
X-Spam-Level:
X-Spam-Status: No, score=-2.649 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=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 WyMkeuAZvmmm for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 Apr 2020 07:25:58 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 5860E3A0DEB for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 22 Apr 2020 07:23:15 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jRGEb-0004WN-KY for ietf-http-wg-dist@listhub.w3.org; Wed, 22 Apr 2020 14:20:17 +0000
Resent-Date: Wed, 22 Apr 2020 14:20:17 +0000
Resent-Message-Id: <E1jRGEb-0004WN-KY@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <pofmagicfingers@gmail.com>) id 1jRGEa-0004VI-9V for ietf-http-wg@listhub.w3.org; Wed, 22 Apr 2020 14:20:16 +0000
Received: from mail-il1-f182.google.com ([209.85.166.182]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <pofmagicfingers@gmail.com>) id 1jRGEW-0002hm-Ir for ietf-http-wg@w3.org; Wed, 22 Apr 2020 14:20:16 +0000
Received: by mail-il1-f182.google.com with SMTP id s10so2016150iln.11 for <ietf-http-wg@w3.org>; Wed, 22 Apr 2020 07:20:12 -0700 (PDT)
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=u6Bb45idOFP0QzMYlsO5k34OLrE/CQ2LAcmvEADYQug=; b=FY5WY/bUNqXOJcziDyE+UjfVU/8cbrj4zwlQnCgmcw7qxSTyWjHqjgK/ytoZxZXLhi 9IM6uQc/9PNgelgKx6ZgX4b3GDJNEgBEKN85guebBPX84+dUepQfF6C6onVFmFivpv3Q amg1CUfNARZNNuE+141zG9hpIKwoTF7fWUHdXu22SLsUNxITynV0NH00gOqk50HTDiTE LZDRC8bvI32vZcgpN9t+osi7snvS+GITIgcJ0a8/K2NteoHG8rl86/mJh95I//EgGne2 sgeEwFoHQ7pqYVyXt06/RISuhkFDHa/Up/dbvpn58eN0qa0JqVfYBt9Lm9lIZeLDe01f 527w==
X-Gm-Message-State: AGi0PubPGIiznMra+CG+FgdKRmzhFOMsQCIJ+8nE9041kcBbD9PdnXoV 9lllYP6PEe50nV4nBa5uaxrS38fBppxgONOVaVs=
X-Google-Smtp-Source: APiQypINY8HQHyabXXwWiu45jx6/g3bsa7DM9ayli+yGxDp/E5KLubEK9p149CEcR4S1PMSRIxQWXYepSLJY8KJ3+nA=
X-Received: by 2002:a92:af1d:: with SMTP id n29mr25477351ili.306.1587565201444; Wed, 22 Apr 2020 07:20:01 -0700 (PDT)
MIME-Version: 1.0
References: <CAMMwswmbL03nSjXbqrDaFjqeS3Ti5CoUx6Gb9gh7uPytqPPSHg@mail.gmail.com> <d909ee52-c6b0-388a-2404-db2c356963bf@treenet.co.nz>
In-Reply-To: <d909ee52-c6b0-388a-2404-db2c356963bf@treenet.co.nz>
From: "Pof Magicfingers (Giovanni Olivera)" <pof@pof.pm>
Date: Wed, 22 Apr 2020 16:21:14 +0200
Message-ID: <CAMMwsw=uLTLXywO0PMV9Ly69WepDq_rz21ggpDSLujHT8c0JjQ@mail.gmail.com>
To: Amos Jeffries <squid3@treenet.co.nz>
Cc: ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="000000000000e3d2c205a3e1d361"
Received-SPF: pass client-ip=209.85.166.182; envelope-from=pofmagicfingers@gmail.com; helo=mail-il1-f182.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1jRGEW-0002hm-Ir 1749de4953f3be3a77d0955eef79a386
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Should the HTTP Method change when following a 303 redirect ?
Archived-At: <https://www.w3.org/mid/CAMMwsw=uLTLXywO0PMV9Ly69WepDq_rz21ggpDSLujHT8c0JjQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37541
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>

If I understand this correctly, except for specific protocols defining
other rules, by default, a standard http user agent should use a GET or
HEAD method when following the Location header for 303, as they're the
regular retrieval method ?

Thanks for the clarification !
Pof

Le mer. 22 avr. 2020 à 15:38, Amos Jeffries <squid3@treenet.co.nz> a écrit :

> On 22/04/20 10:41 pm, Pof Magicfingers (Giovanni Olivera) wrote:
> > Hi everyone,
> >
> > I'm reaching out to you to clarify what behavior is expected regarding a
> > 303 redirect.
> >
> > I'm currently discussing about this with the cURL team, and we're not
> > really sure if a user agent SHOULD or MAY change the HTTP method to GET
> > or HEAD when following a 303 redirect.
> > You can read the discussion here :
> https://github.com/curl/curl/issues/5237
> >
> > Reading RFC7231 at section-6.4.4
> > <https://tools.ietf.org/html/rfc7231#section-6.4.4>, it states that :
> >
> >> A user agent can perform a retrieval request targeting that URI (a GET
> > or HEAD  request if using HTTP)
> >> [...]
> >> This status code is applicable to any HTTP method.
> >
> > But it seems unclear if the user agent SHOULD use a GET method when
> > following the redirect,  regardless of the current method used, for a
> > 303 redirect, of it should keep the current method used for the request
> > inducing that redirect.
>
> The Location URL in a 303 is defined for _retrieval_. Only retrieval
> methods can be expected to work on it.
>
> HTTP defined GET and HEAD for regular use, but other protocols may
> define more methods for retrieval. So there is no requirement to use
> GET/HEAD specifically. Those other protocol alternatives may be used if
> the context needs one.
>
>
> Amos
>