forked from erlyaws/yaws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parse_set_cookie/1 and format_set_cookie/1 functions
1. According to the RFCs 2109 and 2965, multiple cookies can be set in a single 'Set-Cookie' header. So, yaws_api:parse_set_cookie/1 now returns a list of #setcookie{} records. If no cookie was found or if an error occurred, it returns []. The parsing is also improved. Note that this fix breaks the compatibility with previous versions. 2. In yaws_api:format_set_cookie/1, options are now always formated as quoted-strings. 3. 2 new functions are added, yaws_api:parse_cookie/1 and yaws_api:format_cookie/1, to parse and format 'Cookie' headers. To let these functions to work, the #cookie{} record was introduced. Documentation and testsuite are updated accordingly.
- Loading branch information
Showing
4 changed files
with
636 additions
and
161 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
Oops, something went wrong.