From 659ca05c546ed8b537fe0d36cf5520ad0bc62a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 20 Dec 2012 14:36:40 +0100 Subject: We accept iodata() when setting cookies; fix that --- src/cowboy_http.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cowboy_http.erl') 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, -- cgit v1.2.3