From a74ccd99815cfb07fa9f2a9365b15e28e1864156 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Wed, 24 Mar 2021 18:59:38 +0800 Subject: [PATCH] fix default body limit --- awc/src/response.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awc/src/response.rs b/awc/src/response.rs index 96b02af7d..994ddb761 100644 --- a/awc/src/response.rs +++ b/awc/src/response.rs @@ -228,7 +228,7 @@ impl fmt::Debug for ClientResponse { } } -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 { @@ -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)), } }