Skip to content

Commit

Permalink
Today, $y in my ($x, $y) = split("=", "YYY=", 2) is Any instead of …
Browse files Browse the repository at this point in the history
…empty string.
  • Loading branch information
tokuhirom committed Oct 30, 2015
1 parent 1fd5b55 commit f7bca35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion META6.json
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/Cookie/Baker.pm6
Expand Up @@ -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;
Expand Down

0 comments on commit f7bca35

Please sign in to comment.