From 696e8564644571a4248e6dfe0b303d7ea342a33d Mon Sep 17 00:00:00 2001 From: tigercosmos Date: Sun, 19 Aug 2018 03:14:34 +0800 Subject: [PATCH] Network: Preserve HEAD on 303 redirect fixed #21449. This is an update for spec. --- components/net/http_loader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index 3f4eb381c93..e602c432fd8 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -677,7 +677,7 @@ pub fn http_redirect_fetch(request: &mut Request, // Step 11 if response.actual_response().status.map_or(false, |code| ((code == StatusCode::MovedPermanently || code == StatusCode::Found) && request.method == Method::Post) || - code == StatusCode::SeeOther) { + (code == StatusCode::SeeOther && request.method != Method::Head)) { request.method = Method::Get; request.body = None; }