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