0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Fix the init_shutdown test

This commit is contained in:
Loïc Hoguin 2011-10-19 18:50:06 +02:00
parent 1e7338bdd4
commit 97df2a2d79

View file

@ -5,12 +5,12 @@
-export([init/3, handle/2, terminate/2]).
init({_Transport, http}, Req, _Opts) ->
Req2 = cowboy_http_req:reply(<<"666 Init Shutdown Testing">>,
{ok, Req2} = cowboy_http_req:reply(<<"666 Init Shutdown Testing">>,
[{'Connection', <<"close">>}], Req),
{shutdown, Req2, undefined}.
handle(Req, State) ->
Req2 = cowboy_http_req:reply(200, [], "Hello world!", Req),
{ok, Req2} = cowboy_http_req:reply(200, [], "Hello world!", Req),
{ok, Req2, State}.
terminate(_Req, _State) ->