aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Https Redirect: Change default status code to 307 #285

Closed Tratcher closed 6 years ago

Tratcher commented 6 years ago

210

307 indicates that the method should not be changed when redirecting as was common practice for 301. This works better for request with bodies.

jkotalik commented 6 years ago

Should we also make this the default in UrlRewrite? https://github.com/aspnet/BasicMiddleware/blob/9814f3bfbcf3a11dc86c4047fbfc2fe48744f96c/src/Microsoft.AspNetCore.Rewrite/RewriteOptionsExtensions.cs#L96

Tratcher commented 6 years ago

I hesitate to change the default on previously shipped components. There is some small risk that this won't work with some clients.

jkotalik commented 6 years ago

Alright, that's fine. Can you add a remark saying the default is 307 in the options?