Permalink
Browse files

amended get_combined_value.

  • Loading branch information...
1 parent 888ceb5 commit 53ee10b6f817f8269dcc3d0c22b14ca5897996ee @kmwang kmwang committed Oct 15, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/mochiweb_headers.erl
@@ -128,12 +128,10 @@ get_combined_value(K, T) ->
undefined ->
undefined;
V ->
- UniqueValuesList = sets:to_list(sets:from_list(string:tokens(V, " ,"))),
- case length(UniqueValuesList) =:= 1 of
- true ->
- [Val|_Ignore] = UniqueValuesList,
+ case sets:to_list(sets:from_list(string:tokens(V, " ,"))) of
+ [Val] ->
Val;
- false ->
+ _ ->
undefined
end
end.

0 comments on commit 53ee10b

Please sign in to comment.