From 97460a599377eab084ffe99588b2c24bab23c27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 6 Oct 2011 01:07:49 +0200 Subject: Fix a crash in websocket_handshake when cowboy_http_req:compact/1 is used Also add a call to compact/1 in the websocket test handler so we may catch bugs related to it faster later on. --- test/websocket_handler.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/websocket_handler.erl b/test/websocket_handler.erl index 4ba2a67..0cfc8f3 100644 --- a/test/websocket_handler.erl +++ b/test/websocket_handler.erl @@ -18,7 +18,8 @@ terminate(_Req, _State) -> websocket_init(_TransportName, Req, _Opts) -> erlang:start_timer(1000, self(), <<"websocket_init">>), - {ok, Req, undefined}. + Req2 = cowboy_http_req:compact(Req), + {ok, Req2, undefined}. websocket_handle({text, Data}, Req, State) -> {reply, {text, Data}, Req, State}; -- cgit v1.2.3