diff --git a/META6.json b/META6.json index 9e72c67..b691084 100644 --- a/META6.json +++ b/META6.json @@ -2,13 +2,15 @@ "name" : "Cookie::Baker", "source-url" : "git://github.com/tokuhirom/p6-Cookie-Baker.git", "perl" : "v6", + "build-depends" : [ ], "provides" : { "Cookie::Baker" : "lib/Cookie/Baker.pm6" }, "depends" : [ "URI::Encode" ], - "description" : "", + "description" : "Cookie string generator / parser", + "test-depends" : [ ], "version" : "*", "authors" : [ "Tokuhiro Matsuno" diff --git a/lib/Cookie/Baker.pm6 b/lib/Cookie/Baker.pm6 index 833c187..ecbd010 100644 --- a/lib/Cookie/Baker.pm6 +++ b/lib/Cookie/Baker.pm6 @@ -60,7 +60,7 @@ sub crush-cookie(Str $cookie_string) is export { for @pairs ==> map { .trim } -> $pair { my ($key, $value) = split( "=", $pair, 2 ); $key = uri_decode($key); - $value = uri_decode($value); + $value = $value.defined ?? uri_decode($value) !! ''; # Take the first one like CGI.pm or rack do %results{$key} = $value unless %results{$key}:exists;