mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
set response.body asynchronously in Fetch
This commit is contained in:
parent
22ce878edc
commit
b187985e49
5 changed files with 114 additions and 73 deletions
|
@ -9,6 +9,7 @@ use std::ascii::AsciiExt;
|
|||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::Receiver;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use url::Url;
|
||||
|
||||
pub trait ResponseMethods {
|
||||
|
@ -24,7 +25,7 @@ impl ResponseMethods for Response {
|
|||
url_list: RefCell::new(Vec::new()),
|
||||
status: Some(StatusCode::Ok),
|
||||
headers: Headers::new(),
|
||||
body: RefCell::new(ResponseBody::Empty),
|
||||
body: Arc::new(Mutex::new(ResponseBody::Empty)),
|
||||
cache_state: CacheState::None,
|
||||
https_state: HttpsState::None,
|
||||
internal_response: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue