Use temporary redirects for future series

Per [1],

> [Permanent redirections] are meant to last forever. They imply that
> the original URL should not be used anymore and that the new one is
> preferred. Search engine robots trigger an update of the associated
> URL for the resource in their indexes.

That doesn't seem like a good idea when we *know* that the redirect
location is going to change, and on a reasonably short time scale. Use
302 instead; 303 or 307 would probably work as well, but 302 should have
very broad client support.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections

Change-Id: Ia2e8c46c27ac97217576afdd1677efba4b99fc37
This commit is contained in:
Tim Burke 2019-03-25 22:54:11 -07:00
parent dfb831dff0
commit a8d377c96d

View File

@ -42,6 +42,6 @@ def generate_constraints_redirections(_deliverables, future_releases=[]):
redirections.insert(0, dict(code=301, src=deliv.series, dst=target))
for series in future_releases:
redirections.insert(0, dict(code=301, src=series, dst='master'))
redirections.insert(0, dict(code=302, src=series, dst='master'))
return redirections