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.
Refactor Set-Cookie/Cookie header parsing to follow RFC6265
RFC6265 obsoletes RFC2965 and RFC2109. #setcookie{} and #cookie{} are changed to reflect this new RFC. So, yaws_api:parse_set_cookie/1 and yaws_api:parse_cookie/1 are refactored accordingly: * yaws_api:parse_set_cookie/1: Because RFC2109 and RFC2965 are still used, we try to be backward compatible with these old RFCs. So this function returns a #setcookie{} record when only one cookie is found else it returns a list of #setcookie{} records. in RFC2109 and RFC2965, cookies are separated by comma. So, comma is forbidden in 'path-av' and 'extension-av' except for double-quoted value. The parsing are not really strict because of the compatibility and can lead to unwanted behaviors. Old attributes (like 'Comment' or 'Port') are still parsed and can be found into #setcookie.extensions field. * yaws_api:parse_cookie/1: This function follows the RFC6265, so all cookie attributes (like '$Domain' or '$Path') are parsed like any other cookie.
- Loading branch information
Christopher Faulet
committed
Jul 10, 2012
1 parent
a721cfc
commit ba07506
Showing
6 changed files
with
718 additions
and
372 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.