novaframework / nova

Web framework for Erlang.
http://www.novaframework.org
Apache License 2.0
230 stars 21 forks source link

Fix read body for large payloads #270

Closed thatpythonguy closed 6 months ago

thatpythonguy commented 6 months ago

Fixes a bug caused by a payload (HTTP body) that is large enough that Cowboy streams it (i.e., when cowboy_req:read_body/2 is called multiple times). This is in line with the example given by Cowboy here

Without this fix, only the last chunk of the stream is returned as the body of the request.

Taure commented 6 months ago

It looks good and thank you for the PR.