1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 09:49:29 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -3,8 +3,11 @@
## Unreleased - 2021-xx-xx
### Changed
* Feature `cookies` is now optional and enabled by default. [#1981]
* `JsonBody::new` returns a default limit of 32kB to be consistent with `JsonConfig` and the
default behaviour of the `web::Json<T>` extractor. [#2010]
[#1981]: https://github.com/actix/actix-web/pull/1981
[#2010]: https://github.com/actix/actix-web/pull/2010
## 4.0.0-beta.3 - 2021-02-10

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 {