mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Move the ensure_response call before ensure_body_processed
We want to reply as soon as possible.
This commit is contained in:
parent
5095c27c65
commit
ba87aa4193
1 changed files with 1 additions and 1 deletions
|
@ -357,8 +357,8 @@ terminate_request(HandlerState, Req, State) ->
|
|||
next_request(Req=#http_req{connection=Conn, buffer=Buffer},
|
||||
State=#state{req_keepalive=Keepalive, max_keepalive=MaxKeepalive},
|
||||
HandlerRes) ->
|
||||
BodyRes = ensure_body_processed(Req),
|
||||
RespRes = ensure_response(Req),
|
||||
BodyRes = ensure_body_processed(Req),
|
||||
case {HandlerRes, BodyRes, RespRes, Conn} of
|
||||
{ok, ok, ok, keepalive} when Keepalive < MaxKeepalive ->
|
||||
?MODULE:parse_request(State#state{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue