From d081e573167cc139debb00e78333310a18b2cdf2 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 19 Nov 2019 19:38:42 +0600 Subject: [PATCH] fix h2 client send body --- actix-http/src/client/h2proto.rs | 2 ++ actix-http/src/request.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/actix-http/src/client/h2proto.rs b/actix-http/src/client/h2proto.rs index 25299fd61..1647abf81 100644 --- a/actix-http/src/client/h2proto.rs +++ b/actix-http/src/client/h2proto.rs @@ -159,6 +159,8 @@ async fn send_body( } else { if !b.is_empty() { send.reserve_capacity(b.len()); + } else { + buf = None; } continue; } diff --git a/actix-http/src/request.rs b/actix-http/src/request.rs index 0afa45cbf..77ece01c5 100644 --- a/actix-http/src/request.rs +++ b/actix-http/src/request.rs @@ -204,7 +204,6 @@ mod tests { assert_eq!(req.uri().query(), Some("q=1")); let s = format!("{:?}", req); - println!("T: {:?}", s); assert!(s.contains("Request HTTP/1.1 GET:/index.html")); } }