aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-10-07 16:14:39 +0200
committerLoïc Hoguin <[email protected]>2011-10-07 16:14:39 +0200
commitfd786ef2334626434737034ce32bcc8c588a7e1f (patch)
treea9c96b27ab9a1ae815c410572997c391bd04d195 /src
parent138cccb4f9bcfa278af12abc559a551144ab2170 (diff)
downloadcowboy-fd786ef2334626434737034ce32bcc8c588a7e1f.tar.gz
cowboy-fd786ef2334626434737034ce32bcc8c588a7e1f.tar.bz2
cowboy-fd786ef2334626434737034ce32bcc8c588a7e1f.zip
Fix a crash in response_connection when Name is an atom =/= 'Connection'
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_req.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index a1a37bd..446e944 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -390,6 +390,7 @@ response_connection([], Connection) ->
response_connection([{Name, Value}|Tail], Connection) ->
case Name of
'Connection' -> response_connection_parse(Value);
+ Name when is_atom(Name) -> response_connection(Tail, Connection);
Name ->
Name2 = cowboy_bstr:to_lower(Name),
case Name2 of