mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
Fix {cowboy_req, resp_sent} potentially leaking in loop handlers
This commit is contained in:
parent
8050f2e0fa
commit
638638a841
2 changed files with 18 additions and 4 deletions
|
@ -121,6 +121,7 @@ handler_init(State=#state{env=Env, transport=Transport,
|
|||
upgrade_error(Req, Env)
|
||||
end.
|
||||
|
||||
%% Only send an error reply if there is no resp_sent message.
|
||||
-spec upgrade_error(Req, Env) -> {ok, Req, Env} | {error, 400, Req}
|
||||
when Req::cowboy_req:req(), Env::cowboy_middleware:env().
|
||||
upgrade_error(Req, Env) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue