aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_http_req.erl2
-rw-r--r--test/websocket_handler.erl3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index 889fb10..66f2da4 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -366,7 +366,7 @@ chunk(Data, #http_req{socket=Socket, transport=Transport, resp_state=chunks}) ->
-spec compact(#http_req{}) -> #http_req{}.
compact(Req) ->
Req#http_req{host=undefined, host_info=undefined, path=undefined,
- path_info=undefined, qs_vals=undefined, raw_qs=undefined,
+ path_info=undefined, qs_vals=undefined,
bindings=undefined, headers=[]}.
%% Internal.
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};