From b669b1b5a39de6acfa6eb051e53c31eeecc8733e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 13 Sep 2011 23:41:34 +0200 Subject: Reset the max number of empty lines between keepalive requests Fixes issue #47. --- src/cowboy_http_protocol.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index 9923591..35a0471 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -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. -- cgit v1.2.3