fix default body limit

This commit is contained in:
fakeshadow 2021-03-24 18:59:38 +08:00
parent 5fab77f42c
commit a74ccd9981
1 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ impl<S> fmt::Debug for ClientResponse<S> {
}
}
const DEFAULT_BODY_LIMIT: usize = 1024 * 2 * 1024;
const DEFAULT_BODY_LIMIT: usize = 2 * 1024 * 1024;
/// Future that resolves to a complete HTTP message body.
pub struct MessageBody<S> {
@ -258,7 +258,7 @@ where
MessageBody {
length,
timeout: std::mem::take(&mut res.timeout),
body: Ok(ReadBody::new(res.take_payload(), BODY_LIMIT)),
body: Ok(ReadBody::new(res.take_payload(), DEFAULT_BODY_LIMIT)),
}
}