-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use "strict encoding" for Base64 encoded cookies
The prior implementation would include new lines characters. Subsequently, these characters would then be URI encoded when the headers are written (as "%0A"). Not including new lines via "strict encoding" will slightly reduce the size for long session values. In order to handle existing sessions encoded with new lines, Base64#decode will handle ArgumentError exceptions and try to decode using non-strict encoding. A couple of small specs have also been added for this case. # Conflicts: # lib/rack/session/cookie.rb
- Loading branch information
Showing
2 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
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
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