Browse Source

Fix a crash in response_connection when Name is an atom =/= 'Connection'

Loïc Hoguin 13 years ago
parent
commit
fd786ef233
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/cowboy_http_req.erl

+ 1 - 0
src/cowboy_http_req.erl

@@ -390,6 +390,7 @@ response_connection([], Connection) ->
 response_connection([{Name, Value}|Tail], Connection) ->
 response_connection([{Name, Value}|Tail], Connection) ->
 	case Name of
 	case Name of
 		'Connection' -> response_connection_parse(Value);
 		'Connection' -> response_connection_parse(Value);
+		Name when is_atom(Name) -> response_connection(Tail, Connection);
 		Name ->
 		Name ->
 			Name2 = cowboy_bstr:to_lower(Name),
 			Name2 = cowboy_bstr:to_lower(Name),
 			case Name2 of
 			case Name2 of