mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
ejabberd_http: Cope with large POST/PUT requests
gen_tcp returns 'enomem' if we try to receive more than 64 MiB.
This commit is contained in:
parent
d039b9b72b
commit
2d22507636
@ -513,8 +513,8 @@ recv_data(#state{trail = Trail} = State, Len, <<>>) when byte_size(Trail) > Len
|
||||
recv_data(State, Len, Acc) ->
|
||||
case State#state.trail of
|
||||
<<>> ->
|
||||
case (State#state.sockmod):recv(State#state.socket, Len,
|
||||
300000)
|
||||
case (State#state.sockmod):recv(State#state.socket,
|
||||
min(Len, 16#4000000), 300000)
|
||||
of
|
||||
{ok, Data} ->
|
||||
recv_data(State, Len - byte_size(Data), <<Acc/binary, Data/binary>>);
|
||||
|
Loading…
Reference in New Issue
Block a user