Make 303 redirects do GET like Net Framework (#49095)
authorTimothyByrd <55807828+TimothyByrd@users.noreply.github.com>
Tue, 9 Mar 2021 23:29:00 +0000 (15:29 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Mar 2021 23:29:00 +0000 (15:29 -0800)
commit0ab99cee3d118d42519548ce91ddae9645e98bfc
tree0e5b26cebc8a31dd0b115d28b55dd0437f556d2d
parentf7072ecfd44c52a1de5c8d71b2ead35194d8b7d0
Make 303 redirects do GET like Net Framework (#49095)

* Make 303 redirects do GET like Net Framework

In Net Framework, PUT redirects on a 303 do a GET.
Net 5.0 breaks compatibility with this.
See https://github.com/dotnet/runtime/issues/28998
This commit causes redirects of a 303 to do a GET for all methods except HEAD.

Co-authored-by: Timothy Byrd <timothy.byrd@laserfiche.com>
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs