aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gun_ws.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gun_ws.erl b/src/gun_ws.erl
index a3ec618..86e8524 100644
--- a/src/gun_ws.erl
+++ b/src/gun_ws.erl
@@ -51,8 +51,17 @@ do_check_options([]) ->
ok;
do_check_options([{compress, B}|Opts]) when B =:= true; B =:= false ->
do_check_options(Opts);
+do_check_options([{default_protocol, M}|Opts]) when is_atom(M) ->
+ do_check_options(Opts);
+do_check_options([Opt={protocols, L}|Opts]) when is_list(L) ->
+ case lists:flatten([[is_binary(B), is_atom(M)] || {B, M} <- L]) of
+ [true] -> do_check_options(Opts);
+ _ -> {error, {options, {ws, Opt}}}
+ end;
+do_check_options([{user_opts, _}|Opts]) ->
+ do_check_options(Opts);
do_check_options([Opt|_]) ->
- {error, {options, {spdy, Opt}}}.
+ {error, {options, {ws, Opt}}}.
name() -> ws.