| // request body of unknown size exceeding limit during buffering | ||
| if ($error instanceof OverflowException) { | ||
| return new Response(413, array('Content-Type' => 'text/plain'), 'Request body exceeds allowed limit'); | ||
| return $stack($request); |
| $body->on('close', function () use ($stack, $request, $resolve) { | ||
| $resolve($stack($request)); | ||
| }); | ||
| }); |
| } | ||
|
|
||
| public function testExcessiveSizeReturnsError413() | ||
| public function testExcessiveSizeBodyIsDisgardedTheRequestIsPassedDownToTheNextMiddleware() |
| rejected with a `413` (Request Entity Too Large) error message without calling | ||
| the next middleware handlers. | ||
| accepted but their request body will not be added to the request. Browsers consider | ||
| a request failed when a response is sent before the entire request has gone out. |
clue approved these changes Dec 8, 2017
jsor approved these changes Dec 8, 2017