mirror of https://github.com/fafhrd91/actix-web
parent
9b1db1b950
commit
f74ce86769
|
@ -246,7 +246,12 @@ where
|
||||||
///
|
///
|
||||||
/// The default limit size is 100.
|
/// The default limit size is 100.
|
||||||
pub fn limit(mut self, limit: usize) -> Self {
|
pub fn limit(mut self, limit: usize) -> Self {
|
||||||
|
if limit == 0 {
|
||||||
|
self.config.limit = u32::MAX as usize;
|
||||||
|
} else {
|
||||||
self.config.limit = limit;
|
self.config.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue