From bc39b433bb20c44690b75bf28539983517002268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 6 Dec 2017 14:05:30 +0100 Subject: Properly handle OPTIONS * requests Support for these was broken during the development of Cowboy 2.0. It is now fixed and better handled than it ever was. --- test/handlers/asterisk_h.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/handlers/asterisk_h.erl') diff --git a/test/handlers/asterisk_h.erl b/test/handlers/asterisk_h.erl index 56b8bcb..563b488 100644 --- a/test/handlers/asterisk_h.erl +++ b/test/handlers/asterisk_h.erl @@ -7,6 +7,8 @@ init(Req, Opts) -> echo(cowboy_req:header(<<"x-echo">>, Req), Req, Opts). +echo(undefined, Req, Opts) -> + {ok, cowboy_req:reply(200, Req), Opts}; echo(What, Req, Opts) -> F = binary_to_atom(What, latin1), Value = case cowboy_req:F(Req) of -- cgit v1.2.3