0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

Reset the max number of empty lines between keepalive requests

Fixes issue #47.
This commit is contained in:
Loïc Hoguin 2011-09-13 23:41:34 +02:00
parent 961526d704
commit b669b1b5a3
2 changed files with 22 additions and 3 deletions

View file

@ -246,7 +246,8 @@ next_request(HandlerState, Req=#http_req{buffer=Buffer}, State) ->
RespRes = ensure_response(Req, State),
case {HandlerRes, BodyRes, RespRes, State#state.connection} of
{ok, ok, ok, keepalive} ->
?MODULE:parse_request(State#state{buffer=Buffer});
?MODULE:parse_request(State#state{
buffer=Buffer, req_empty_lines=0});
_Closed ->
terminate(State)
end.