From ce32e1985afd6c629ed904a7cf2b3c119782e914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 24 Nov 2017 00:16:19 +0100 Subject: Add more tests to the rfc7230 suite Found more bugs! Unfortunately no fix for them in this commit. --- test/handlers/send_message_h.erl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/handlers/send_message_h.erl (limited to 'test/handlers') diff --git a/test/handlers/send_message_h.erl b/test/handlers/send_message_h.erl new file mode 100644 index 0000000..02d2139 --- /dev/null +++ b/test/handlers/send_message_h.erl @@ -0,0 +1,9 @@ +%% This module sends a message to the pid passed in a header. + +-module(send_message_h). +-export([init/2]). + +init(Req, State) -> + Pid = list_to_pid(binary_to_list(cowboy_req:header(<<"x-test-pid">>, Req))), + Pid ! {Pid, self(), init, Req, State}, + {ok, cowboy_req:reply(200, Req), State}. -- cgit v1.2.3