Re: QUERY method status codes for indirect/redirect response

On 19.09.2024 18:26, Graham Klyne wrote:
> ref:
> https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html
>
> Scanning this draft, and in particular section 4.2, I started wondering
> about an indirect response vs a redirected response. Specifically, I was
> thinking of an HTTP 301 (moved permanently) response.  Is this to
> resubmit the "query" to a different resource, or to always revisit the
> specified resource for a response to the same query?

QUERY doesn't change the semantics of the redirect codes. 301 means:
please resubmit the same request to the URI in the Location field (and
this is a permanent move).

> I had to go re-check, but I think the HTTP spec is reasonably clear
> about this (use 303 for indirect response, use 307 or 308 to resubmit
> the query elsewhere, probably avoid 301, 302).  I'm wondering if some

Yes.

> (non-normative) discussion of this is appropriate?  It strikes me that
> this method is likely to be used by arbitrary non-browser applications,
> whose authors may not be as deeply steeped in HTTP specifics as (say) a
> browser implementer, and who might benefit from a little additional
> guidance here.  Or at least point a reader at
> https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes ?

I agree that we should expand the examples (and also combine them with
the discussion about Content-Location vs Location).

Do you want to open a ticket at
https://github.com/httpwg/http-extensions to track this?

Best regards, Julian

Received on Tuesday, 24 September 2024 05:21:30 UTC