Created
February 15, 2011 23:31
-
-
Save bigpresh/828519 to your computer and use it in GitHub Desktop.
Supporting comma-separated cookies...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Dancer/Cookies.pm b/lib/Dancer/Cookies.pm | |
index 15735fe..dd4992d 100644 | |
--- a/lib/Dancer/Cookies.pm | |
+++ b/lib/Dancer/Cookies.pm | |
@@ -23,7 +23,7 @@ sub parse_cookie_from_env { | |
return {} unless defined $env_str; | |
my $cookies = {}; | |
- foreach my $cookie ( split( '; ', $env_str ) ) { | |
+ foreach my $cookie ( split( /[,;]\s/, $env_str ) ) { | |
my ( $name, $value ) = split( '=', $cookie ); | |
my @values; | |
if ( $value ne '' ) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment