mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-28 02:49:02 +02:00
add h1::SendResponse future; renamed to MessageBody::size
This commit is contained in:
@ -55,14 +55,14 @@ where
|
||||
io: Some(io),
|
||||
};
|
||||
|
||||
let len = body.length();
|
||||
let len = body.size();
|
||||
|
||||
// create Framed and send reqest
|
||||
Framed::new(io, h1::ClientCodec::default())
|
||||
.send((head, len).into())
|
||||
.from_err()
|
||||
// send request body
|
||||
.and_then(move |framed| match body.length() {
|
||||
.and_then(move |framed| match body.size() {
|
||||
BodySize::None | BodySize::Empty | BodySize::Sized(0) => {
|
||||
Either::A(ok(framed))
|
||||
}
|
||||
|
@ -27,9 +27,9 @@ where
|
||||
T: AsyncRead + AsyncWrite + 'static,
|
||||
B: MessageBody,
|
||||
{
|
||||
trace!("Sending client request: {:?} {:?}", head, body.length());
|
||||
trace!("Sending client request: {:?} {:?}", head, body.size());
|
||||
let head_req = head.method == Method::HEAD;
|
||||
let length = body.length();
|
||||
let length = body.size();
|
||||
let eof = match length {
|
||||
BodySize::None | BodySize::Empty | BodySize::Sized(0) => true,
|
||||
_ => false,
|
||||
|
Reference in New Issue
Block a user