This default implementation should stop buffering when it reaches max_body_length and return the appropriate response.
The default max_body_length can be 8_000_000.
The correct response is 413 Payload Too Large.
A first fix for this could have a hardcoded value, but ideally we would want it configurable as follows.
Example App
When using just
handle_request
(not `handle_body etc) all the parts of the body are bundled in to the request, no matter how large the request is.The code that does this is the default
handle_body
implementation. https://github.com/CrowdHailer/raxx/blob/master/lib/raxx/not_found.ex#L32-L35This default implementation should stop buffering when it reaches
max_body_length
and return the appropriate response. The defaultmax_body_length
can be8_000_000
. The correct response is 413 Payload Too Large.A first fix for this could have a hardcoded value, but ideally we would want it configurable as follows.
checklist