diff options
author | Loïc Hoguin <[email protected]> | 2017-11-24 00:16:19 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-11-24 00:16:19 +0100 |
commit | ce32e1985afd6c629ed904a7cf2b3c119782e914 (patch) | |
tree | a63812736e4c297e7af3f88936534008ba07cb55 /test/handlers/send_message_h.erl | |
parent | 14173d592999bb0478d8e2a7d7334800ee26057c (diff) | |
download | cowboy-ce32e1985afd6c629ed904a7cf2b3c119782e914.tar.gz cowboy-ce32e1985afd6c629ed904a7cf2b3c119782e914.tar.bz2 cowboy-ce32e1985afd6c629ed904a7cf2b3c119782e914.zip |
Add more tests to the rfc7230 suite
Found more bugs! Unfortunately no fix for them in this commit.
Diffstat (limited to 'test/handlers/send_message_h.erl')
-rw-r--r-- | test/handlers/send_message_h.erl | 9 |
1 files changed, 9 insertions, 0 deletions
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}. |