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:
committed by
GitHub
parent
946cccaa1a
commit
3b93c62e23
@@ -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 {
|
||||
|
Reference in New Issue
Block a user