mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #10167 - stjepang:fix-aboutblank-body, r=KiChjang
Fix fetching about:blank When fetching about:blank, response body should be the empty byte sequence. Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch Before this change, response body would be set to `ResponseBody::Empty`, and then fetching would result in an infinite loop at step 19 in fn `main_fetch` (methods.rs). r? @KiChjang <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10167) <!-- Reviewable:end -->
This commit is contained in:
commit
446783f7b6
2 changed files with 15 additions and 0 deletions
|
@ -294,6 +294,7 @@ fn basic_fetch(request: Rc<Request>) -> Response {
|
|||
response.headers.set(ContentType(Mime(
|
||||
TopLevel::Text, SubLevel::Html,
|
||||
vec![(Attr::Charset, Value::Utf8)])));
|
||||
*response.body.lock().unwrap() = ResponseBody::Done(vec![]);
|
||||
response
|
||||
},
|
||||
_ => Response::network_error()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue