aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_req.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-06-22 10:54:22 +0200
committerLoïc Hoguin <[email protected]>2016-06-22 10:54:22 +0200
commit0e68b2a3f579005302ff88a5c0d0a75fd486b9b6 (patch)
tree847e2e0522c9766387961c950b4b384cb618063e /src/cowboy_req.erl
parent2201b7e423cec00c2f2fd660d7b2811cfe9607fd (diff)
downloadcowboy-0e68b2a3f579005302ff88a5c0d0a75fd486b9b6.tar.gz
cowboy-0e68b2a3f579005302ff88a5c0d0a75fd486b9b6.tar.bz2
cowboy-0e68b2a3f579005302ff88a5c0d0a75fd486b9b6.zip
Remove unused local function in cowboy_req
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r--src/cowboy_req.erl22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 19e6fa2..7528d16 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -1060,15 +1060,6 @@ set([{version, Val}|Tail], Req) -> set(Tail, Req#http_req{version=Val}).
%% Internal.
-%% We don't match on "keep-alive" since it is the default value.
--spec connection_to_atom([binary()]) -> keepalive | close.
-connection_to_atom([]) ->
- keepalive;
-connection_to_atom([<<"close">>|_]) ->
- close;
-connection_to_atom([_|Tail]) ->
- connection_to_atom(Tail).
-
-spec status(cowboy:http_status()) -> binary().
status(100) -> <<"100 Continue">>;
status(101) -> <<"101 Switching Protocols">>;
@@ -1190,16 +1181,3 @@ filter_constraints(Tail, Map, Key, Value, Constraints) ->
{true, Value2} ->
filter(Tail, Map#{Key => Value2})
end.
-
-%% Tests.
-
--ifdef(TEST).
-connection_to_atom_test_() ->
- Tests = [
- {[<<"close">>], close},
- {[<<"keep-alive">>], keepalive},
- {[<<"keep-alive">>, <<"upgrade">>], keepalive}
- ],
- [{lists:flatten(io_lib:format("~p", [T])),
- fun() -> R = connection_to_atom(T) end} || {T, R} <- Tests].
--endif.