http-core icon indicating copy to clipboard operation
http-core copied to clipboard

multiple locations for 301/308 redirects?

Open reschke opened this issue 3 years ago • 5 comments

https://httpwg.org/specs/rfc9110.html#status.301:

The 301 (Moved Permanently) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.

Where would these additional locations come from?

(similar text is present for 308)

reschke avatar Sep 15 '22 09:09 reschke

In the hypertext content. They used to be in the URI or Alternates header fields as well, but now just the content. Location only contains the preferred reference.

royfielding avatar Sep 15 '22 21:09 royfielding

Then we should clarify that in the future. We also need to make the temporary and permanent redirect descriptions consistent (or is there a reason why the description for 302 is different with respect to this?).

reschke avatar Sep 16 '22 05:09 reschke

Because we don't need multiple locations for a temporary redirect?

royfielding avatar Sep 16 '22 19:09 royfielding

Think of it this way: 301 was originally designed for authoring tools (TimBL's editor), not web browsers. The content of a 301 response might be a very lengthy explanation of where the resource has moved and why you might want to choose one of many possible replacement links instead of the one being edited into your current document. 302, in contrast, is meant for redirects where the original request URI is still the preferred way to access the resource, and thus only applies to the current browser session.

royfielding avatar Sep 16 '22 19:09 royfielding

Ok, that makes sense.

I belive it would be good if the introduction contained a short paragraph explaining why temporary and permanent redirects are different with respect to this.

reschke avatar Sep 17 '22 05:09 reschke