Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support redirects on "unsafe" HTTP methods #38

Open
jsvd opened this issue Oct 31, 2021 · 0 comments
Open

Support redirects on "unsafe" HTTP methods #38

jsvd opened this issue Oct 31, 2021 · 0 comments

Comments

@jsvd
Copy link
Member

jsvd commented Oct 31, 2021

The httpclient library used by this mixin is very conservative when it comes to status code handling, that only does what MUST be done (not what MAY be done) according to the RFC7231.

According to this RFC, requests MAY be automatically redirected but caution should be taken for unsafe methods (safe: GET/HEAD/OPTIONS, unsafe: POST/PUT/DELETE/PATCH).

The existing setRedirectsEnabled flag will only redirect on safe methods, but it may be desirable to redirect on PUT/POST if the users so wishes, by having this behavior behind an "off-by-default" flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants