0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Add cowboy:accept_ack/1 for a cleaner handling of the shoot message

This commit is contained in:
Loïc Hoguin 2011-12-15 20:19:02 +01:00
parent 874cdd3bda
commit e550ba7cd3
5 changed files with 19 additions and 9 deletions

View file

@ -77,7 +77,7 @@ init(ListenerPid, Socket, Transport, Opts) ->
Timeout = proplists:get_value(timeout, Opts, 5000),
URLDecDefault = {fun cowboy_http:urldecode/2, crash},
URLDec = proplists:get_value(urldecode, Opts, URLDecDefault),
receive shoot -> ok end,
ok = cowboy:accept_ack(ListenerPid),
wait_request(#state{listener=ListenerPid, socket=Socket, transport=Transport,
dispatch=Dispatch, max_empty_lines=MaxEmptyLines,
max_line_length=MaxLineLength, timeout=Timeout, urldecode=URLDec}).