mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
Do not send a 408 response if the Request-Line wasn't fully received
The server should not send a response if there wasn't at least the beginning of a request sent (the Request-Line).
This commit is contained in:
parent
986630d9ad
commit
d25c30790c
2 changed files with 12 additions and 9 deletions
|
@ -87,8 +87,7 @@ wait_request(State=#state{socket=Socket, transport=Transport,
|
|||
case Transport:recv(Socket, 0, T) of
|
||||
{ok, Data} -> parse_request(State#state{
|
||||
buffer= << Buffer/binary, Data/binary >>});
|
||||
{error, timeout} -> error_terminate(408, State);
|
||||
{error, closed} -> terminate(State)
|
||||
{error, _Reason} -> terminate(State)
|
||||
end.
|
||||
|
||||
-spec request({http_request, http_method(), http_uri(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue