extend/cowboy — pull request #461 by rambocoder (2013-03-06 00:53:49+00:00)
Title: Check the length before reading the body in body/1 and body_qs/1

This is a redo of the https://github.com/extend/cowboy/pull/453 pull request.

Fix #446 body/1 body_qs/1 DoS attack vulnerability

Added body/2 body_qs/2 API to cowboy_req which require a number for the maximum bytes a request body will be parsed to.

body/1 by default will read up to 8MB of request body.
body_qs/1 by default will read up to 16KB of request body.