Skip to content

Commit

Permalink
fix set_cookie (make t/09_cookies/05_api.t pass)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Sukrieh committed Mar 1, 2011
1 parent 01525ce commit 78fe8f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Dancer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,13 @@ sub _send_file {
# expires => time() + 3600, domain => '.foo.com'
sub _set_cookie {
my ( $name, $value, %options ) = @_;
my $cookie = Dancer::Cookies->cookies->{$name} = Dancer::Cookie->new(
my $cookie = Dancer::Cookie->new(
name => $name,
value => $value,
%options
);
push_header 'Set-Cookie' => $cookie->to_header;
Dancer::Cookies->cookies->{$name} = $cookie;
}

# Start/Run the application with the chosen apphandler
Expand Down

0 comments on commit 78fe8f8

Please sign in to comment.