Skip to content

Commit 8da01fd

Browse files
GrahamCampbelltaylorotwell
authored andcommitted
Support unlimited post size correctly (#17607)
1 parent 03f3d7d commit 8da01fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class ValidatePostSize
1818
*/
1919
public function handle($request, Closure $next)
2020
{
21-
if ($request->server('CONTENT_LENGTH') > $this->getPostMaxSize()) {
21+
$max = $this->getPostMaxSize();
22+
23+
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
2224
throw new PostTooLargeException;
2325
}
2426

0 commit comments

Comments
 (0)