Skip to content

redir: using temporary issues 302 rather than 307 #7348

@mohammed90

Description

@mohammed90

Issue Details

It's documented that the config redir /target temporary responds with status 302 (Found). However, there's an HTTP status code 307 which "Temporary Redirect" by definition. MDN says the difference is:

The difference between 307 and 302 is that 307 guarantees that the client will not change the request method and body when the redirected request is made. With 302, older clients incorrectly changed the method to GET. 307 and 302 responses are identical when the request method is GET.

I'm not sure if we had a reason for using 302. Should this be changed to 307? Is this change a breaking change?

Found while working on #6255

Assistance Disclosure

AI used

If AI was used, describe the extent to which it was used.

The test case was written by copilot

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞Something isn't workingdiscussion 💬The right solution needs to be found

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions