Fix a mistake in the redirect fetch code

The spec says to ignore both HEAD and GET in step 11
This commit is contained in:
Bastien Orivel 2019-12-21 15:12:07 +01:00
parent aa43ce8cf3
commit 2b28042446
2 changed files with 3 additions and 7 deletions

View file

@ -804,7 +804,9 @@ pub fn http_redirect_fetch(
.map_or(false, |(code, _)| {
((*code == StatusCode::MOVED_PERMANENTLY || *code == StatusCode::FOUND) &&
request.method == Method::POST) ||
(*code == StatusCode::SEE_OTHER && request.method != Method::HEAD)
(*code == StatusCode::SEE_OTHER &&
request.method != Method::HEAD &&
request.method != Method::GET)
})
{
// Step 11.1