aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index d9fa04b..55ecd34 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -215,6 +215,10 @@ version_to_connection({1, 1}) -> keepalive;
version_to_connection(_Any) -> close.
-spec connection_to_atom(Connection::string()) -> keepalive | close.
+connection_to_atom("keep-alive") ->
+ keepalive;
+connection_to_atom("close") ->
+ close;
connection_to_atom(Connection) ->
case string:to_lower(Connection) of
"close" -> close;