﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30582	Redirect by using 307/308 instead of 301/302.	Yoshiki Shibukawa	nobody	"Now, Django uses 301/302 to redirect. This status codes' behaviors are undefined because of historical reason.
RFC-7231 and RFC-7238 introduce new status code 307/308 for more strict usage. These status codes don't allow changing method during redirection.

If Django users mistake form POST URL (and if the URL doesn't end with ""/""), Django returns 301 to redirect new URL with trailing slash. But common browsers change method and send GET request to the new URL. Then user gets weird status code ""405 Method Not Allowed"" with GET. If Django uses 308 instead 301, users will get more meaningful status code like 404 or 201 (if trailing slash would be collect).

Unfortunately, Only IE 11 on Windows 7/8/8.1 don't support 307/308 now (IE11 on Windows 10 supports). And Windows 8.1 lives until 2023. So I made patch that checks user-agent and return 307/308 or 301/302.

* [https://stackoverflow.com/questions/42703671/which-browsers-support-307-308-redirects-and-how-do-they-handle-them?rq=1 307/308 Browser Support on stack overflow]
* [https://gist.github.com/shibukawa/52502ceb5462b6bf6ea6c5704be6659b My Patch]"	New feature	closed	HTTP handling	dev	Normal	wontfix	redirect statuscode		Unreviewed	0	0	0	0	0	0
