Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Checking for atom headers in util

  • Loading branch information...
commit 736b84066b70b8ac2de238e79469d55f9d2bab06 1 parent 3c255e6
@choptastic choptastic authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/simple_bridge_util.erl
View
4 src/simple_bridge_util.erl
@@ -14,7 +14,7 @@
needs_expires_header/1
]).
--type header_key() :: string() | binary().
+-type header_key() :: string() | binary() | atom().
-type header() :: {header_key(), string()}.
-type header_list() :: [header()].
@@ -95,6 +95,8 @@ lower_keys(HeaderList) ->
[to_lower(Key) || {Key,_} <- HeaderList].
-spec to_lower(header_key()) -> string().
+to_lower(Header) when is_atom(Header) ->
+ to_lower(atom_to_list(Header));
to_lower(Header) when is_binary(Header) ->
to_lower(b2l(Header));
to_lower(Header) when is_list(Header) ->
Please sign in to comment.
Something went wrong with that request. Please try again.