Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 18, 2012
1 parent 05a2193 commit 72c23a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -889,8 +889,9 @@ timeout, which usually defaults to C<15> seconds.
$c = $c->session({foo => 'bar'});
$c = $c->session(foo => 'bar');
Persistent data storage, stored serialized with L<Mojo::JSON> in a signed
cookie. Note that cookies are generally limited to 4096 bytes of data.
Persistent data storage, all session data gets serialized with L<Mojo::JSON>
and stored in C<HMAC-SHA1> signed cookies, which usually have a 4096 byte
limit, depending on browser.
# Manipulate session
$c->session->{foo} = 'bar';
Expand All @@ -908,7 +909,8 @@ cookie. Note that cookies are generally limited to 4096 bytes of data.
$c = $c->signed_cookie(foo => 'bar', {path => '/'});
Access signed request cookie values and create new signed response cookies.
Cookies failing signature verification will be automatically discarded.
Cookies failing C<HMAC-SHA1> signature verification will be automatically
discarded.
=head2 C<stash>
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -373,9 +373,9 @@ method L<Mojolicious::Controller/"flash">.
$self->flash(message => 'Everything is fine.');
$self->redirect_to('goodbye');

Just remember that everything is stored serialized with L<Mojo::JSON> in
C<HMAC-SHA1> signed cookies, so there is usually a 4096 byte limit, depending
on the browser.
Just remember that all session data gets serialized with L<Mojo::JSON> and
stored in C<HMAC-SHA1> signed cookies, which usually have a 4096 byte limit,
depending on browser.

=head2 Final prototype

Expand Down

0 comments on commit 72c23a2

Please sign in to comment.