Skip to content

Commit

Permalink
Support unlimited post size correctly (#17607)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored and taylorotwell committed Jan 27, 2017
1 parent 03f3d7d commit 8da01fd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class ValidatePostSize
*/
public function handle($request, Closure $next)
{
if ($request->server('CONTENT_LENGTH') > $this->getPostMaxSize()) {
$max = $this->getPostMaxSize();

if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException;
}

Expand Down

0 comments on commit 8da01fd

Please sign in to comment.