mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix shutdown for HTTP/1.1 pipeline
Sending extra response prevented by terminating all streams except the one currently executing. LH: Reworded some variables to make what happens more obvious.
This commit is contained in:
parent
03a3bf4474
commit
2558ba65ad
4 changed files with 36 additions and 27 deletions
|
@ -157,6 +157,12 @@ raw_recv_head(Socket, Transport, Buffer) ->
|
|||
Buffer
|
||||
end.
|
||||
|
||||
raw_recv_rest({raw_client, _, _}, Length, Buffer) when Length =:= byte_size(Buffer) ->
|
||||
Buffer;
|
||||
raw_recv_rest({raw_client, Socket, Transport}, Length, Buffer) when Length > byte_size(Buffer) ->
|
||||
{ok, Data} = Transport:recv(Socket, Length - byte_size(Buffer), 10000),
|
||||
<< Buffer/binary, Data/binary >>.
|
||||
|
||||
raw_recv({raw_client, Socket, Transport}, Length, Timeout) ->
|
||||
Transport:recv(Socket, Length, Timeout).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue