Skip to content

Add option to keep the same method for 301/302 redirects#3783

Open
kajinamit wants to merge 1 commit intoencode:masterfrom
kajinamit:keep-method-for-redirects
Open

Add option to keep the same method for 301/302 redirects#3783
kajinamit wants to merge 1 commit intoencode:masterfrom
kajinamit:keep-method-for-redirects

Conversation

@kajinamit
Copy link

@kajinamit kajinamit commented Feb 26, 2026

Summary

RFC hasn't been clear enough about the expected behavior for 301 and 302 response. While it's (unfortunately) common for browsers to switch the original http method to GET when following redirects, some server applications expects the "legacy" behavior which keeps the same method over redirects.

Add new option to clients to select the behavior.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

RFC hasn't been clear enough about the expected behavior for 301 and
302 response. While it's (unfortunately) common for browsers to switch
the original http method to GET when following redirects, some server
applications expects the "legacy" behavior which keeps the same method
over redirects.

Add new option to clients to select the behavior.

Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant