mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-30 18:34:36 +01:00
fix h2 client send body
This commit is contained in:
parent
1ffa7d18d3
commit
d081e57316
@ -159,6 +159,8 @@ async fn send_body<B: MessageBody>(
|
|||||||
} else {
|
} else {
|
||||||
if !b.is_empty() {
|
if !b.is_empty() {
|
||||||
send.reserve_capacity(b.len());
|
send.reserve_capacity(b.len());
|
||||||
|
} else {
|
||||||
|
buf = None;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,6 @@ mod tests {
|
|||||||
assert_eq!(req.uri().query(), Some("q=1"));
|
assert_eq!(req.uri().query(), Some("q=1"));
|
||||||
|
|
||||||
let s = format!("{:?}", req);
|
let s = format!("{:?}", req);
|
||||||
println!("T: {:?}", s);
|
|
||||||
assert!(s.contains("Request HTTP/1.1 GET:/index.html"));
|
assert!(s.contains("Request HTTP/1.1 GET:/index.html"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user