diff options
author | Loïc Hoguin <[email protected]> | 2017-12-06 14:05:30 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-12-06 14:05:30 +0100 |
commit | bc39b433bb20c44690b75bf28539983517002268 (patch) | |
tree | c335c45a92f535d2100d04f8a9df8899f459b013 /test/handlers | |
parent | 2eb3e3f994e464ae2678f7c3d321213e5eec9ad4 (diff) | |
download | cowboy-bc39b433bb20c44690b75bf28539983517002268.tar.gz cowboy-bc39b433bb20c44690b75bf28539983517002268.tar.bz2 cowboy-bc39b433bb20c44690b75bf28539983517002268.zip |
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.
Diffstat (limited to 'test/handlers')
-rw-r--r-- | test/handlers/asterisk_h.erl | 2 |
1 files changed, 2 insertions, 0 deletions
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 |