1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-30 12:06:41 +02:00

Fix Json extractor to be 32kB by default (#2010)

This commit is contained in:
Richard Janis Goldschmidt
2021-02-18 16:20:20 +01:00
committed by GitHub
parent 946cccaa1a
commit 3b93c62e23
2 changed files with 5 additions and 2 deletions

View File

@@ -345,7 +345,7 @@ where
let payload = payload.take();
JsonBody::Body {
limit: 262_144,
limit: 32_768,
length,
payload,
buf: BytesMut::with_capacity(8192),
@@ -353,7 +353,7 @@ where
}
}
/// Set maximum accepted payload size. The default limit is 256kB.
/// Set maximum accepted payload size. The default limit is 32kB.
pub fn limit(self, limit: usize) -> Self {
match self {
JsonBody::Body {