mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -101,12 +101,12 @@ pub fn factory(user_agent: String,
|
|||
}
|
||||
}
|
||||
|
||||
enum ReadResult {
|
||||
pub enum ReadResult {
|
||||
Payload(Vec<u8>),
|
||||
EOF,
|
||||
}
|
||||
|
||||
fn read_block<R: Read>(reader: &mut R) -> Result<ReadResult, ()> {
|
||||
pub fn read_block<R: Read>(reader: &mut R) -> Result<ReadResult, ()> {
|
||||
let mut buf = vec![0; 1024];
|
||||
|
||||
match reader.read(&mut buf) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue