mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #21454 - tigercosmos:fetch, r=KiChjang
Network: Preserve HEAD on 303 redirect fixed #21449. This is an update for spec. This PR just update one step for redirect fetch according to spec. No tests result change, since the whole process is still in development(So many todo). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21454) <!-- Reviewable:end -->
This commit is contained in:
commit
022cc93c22
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue