mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
aa43ce8cf3
commit
2b28042446
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue