Skip to content

Commit

Permalink
Fix a mistake in the redirect fetch code
Browse files Browse the repository at this point in the history
The spec says to ignore both HEAD and GET in step 11
  • Loading branch information
Eijebong committed May 5, 2020
1 parent aa43ce8 commit 2b28042
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion components/net/http_loader.rs
Expand Up @@ -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
Expand Down
@@ -1,7 +1,4 @@
[redirect-method.any.worker.html]
[Redirect 303 with GET]
expected: FAIL

[Redirect 307 with POST (string body)]
expected: FAIL

Expand All @@ -10,9 +7,6 @@


[redirect-method.any.html]
[Redirect 303 with GET]
expected: FAIL

[Redirect 307 with POST (string body)]
expected: FAIL

Expand Down

0 comments on commit 2b28042

Please sign in to comment.