aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_req.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index cdd1e06..dddf92e 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -1134,15 +1134,13 @@ response_connection([], Connection) ->
Connection;
response_connection([{Name, Value}|Tail], Connection) ->
case Name of
- <<"connection">> -> response_connection_parse(Value);
- _ -> response_connection(Tail, Connection)
+ <<"connection">> ->
+ Tokens = parse_connection_before(Value, []),
+ connection_to_atom(Tokens);
+ _ ->
+ response_connection(Tail, Connection)
end.
--spec response_connection_parse(binary()) -> keepalive | close.
-response_connection_parse(ReplyConn) ->
- Tokens = cowboy_http:nonempty_list(ReplyConn, fun cowboy_http:token/2),
- connection_to_atom(Tokens).
-
-spec response_merge_headers(cowboy_http:headers(), cowboy_http:headers(),
cowboy_http:headers()) -> cowboy_http:headers().
response_merge_headers(Headers, RespHeaders, DefaultHeaders) ->