mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
added two fetch_async tests involving filtered responses
This commit is contained in:
parent
fee7cb179e
commit
cddc03be33
2 changed files with 80 additions and 4 deletions
|
@ -117,7 +117,14 @@ impl Response {
|
|||
}
|
||||
|
||||
pub fn wait_until_done(&self) {
|
||||
while !self.body.lock().unwrap().is_done() && !self.is_network_error() {
|
||||
match self.response_type {
|
||||
// since these response types can't hold a body, they should be considered done
|
||||
ResponseType::Error | ResponseType::Opaque | ResponseType::OpaqueRedirect => {},
|
||||
_ => {
|
||||
while !self.body.lock().unwrap().is_done() && !self.is_network_error() {
|
||||
// loop until done
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue