mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +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) ->
|
recv_data(State, Len, Acc) ->
|
||||||
case State#state.trail of
|
case State#state.trail of
|
||||||
<<>> ->
|
<<>> ->
|
||||||
case (State#state.sockmod):recv(State#state.socket, Len,
|
case (State#state.sockmod):recv(State#state.socket,
|
||||||
300000)
|
min(Len, 16#4000000), 300000)
|
||||||
of
|
of
|
||||||
{ok, Data} ->
|
{ok, Data} ->
|
||||||
recv_data(State, Len - byte_size(Data), <<Acc/binary, Data/binary>>);
|
recv_data(State, Len - byte_size(Data), <<Acc/binary, Data/binary>>);
|
||||||
|
Loading…
Reference in New Issue
Block a user