diff options
author | Loïc Hoguin <[email protected]> | 2012-12-20 14:36:40 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-12-20 14:36:40 +0100 |
commit | 659ca05c546ed8b537fe0d36cf5520ad0bc62a0f (patch) | |
tree | f731f528bd1ac2a45ca239fca693d8b6c436ee68 /src | |
parent | 8858ca240fe42e3fcd0b9c3b1a2388b432301a27 (diff) | |
download | cowboy-659ca05c546ed8b537fe0d36cf5520ad0bc62a0f.tar.gz cowboy-659ca05c546ed8b537fe0d36cf5520ad0bc62a0f.tar.bz2 cowboy-659ca05c546ed8b537fe0d36cf5520ad0bc62a0f.zip |
We accept iodata() when setting cookies; fix that
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_http.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index aa94016..66383cb 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -859,11 +859,11 @@ ce_identity(Data) -> -spec cookie_to_iodata(iodata(), iodata(), cowboy_req:cookie_opts()) -> iodata(). cookie_to_iodata(Name, Value, Opts) -> - case binary:match(Name, [<<$=>>, <<$,>>, <<$;>>, + case binary:match(iolist_to_binary(Name), [<<$=>>, <<$,>>, <<$;>>, <<$\s>>, <<$\t>>, <<$\r>>, <<$\n>>, <<$\013>>, <<$\014>>]) of nomatch -> ok end, - case binary:match(Value, [<<$,>>, <<$;>>, + case binary:match(iolist_to_binary(Value), [<<$,>>, <<$;>>, <<$\s>>, <<$\t>>, <<$\r>>, <<$\n>>, <<$\013>>, <<$\014>>]) of nomatch -> ok end, |