mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +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, _)| {
|
.map_or(false, |(code, _)| {
|
||||||
((*code == StatusCode::MOVED_PERMANENTLY || *code == StatusCode::FOUND) &&
|
((*code == StatusCode::MOVED_PERMANENTLY || *code == StatusCode::FOUND) &&
|
||||||
request.method == Method::POST) ||
|
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
|
// Step 11.1
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
[redirect-method.any.worker.html]
|
[redirect-method.any.worker.html]
|
||||||
[Redirect 303 with GET]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Redirect 307 with POST (string body)]
|
[Redirect 307 with POST (string body)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -10,9 +7,6 @@
|
||||||
|
|
||||||
|
|
||||||
[redirect-method.any.html]
|
[redirect-method.any.html]
|
||||||
[Redirect 303 with GET]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Redirect 307 with POST (string body)]
|
[Redirect 307 with POST (string body)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue