Skip to content

Commit

Permalink
Fix read body for large payloads (#270)
Browse files Browse the repository at this point in the history
Co-authored-by: El Babilonio <elbabilonio@flamencomio.com>
  • Loading branch information
thatpythonguy and El Babilonio committed Mar 14, 2024
1 parent 1a88865 commit a95ac2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/nova_request_plugin.erl
Expand Up @@ -98,6 +98,6 @@ modulate_state(State, [_|Tl]) ->

read_body(Req, Acc) ->
case cowboy_req:read_body(Req) of
{ok, Data, Req0} -> Req0#{body => Data};
{more, Data, Req0} -> read_body(Req0, <<Data/binary, Acc/binary>>)
end.
{ok, Data, Req0} -> Req0#{body => <<Acc/binary, Data/binary>>};
{more, Data, Req0} -> read_body(Req0, <<Acc/binary, Data/binary>>)
end.

0 comments on commit a95ac2f

Please sign in to comment.