=htc accept comma as cookie separator
Port of https://github.com/spray/spray/pull/870
This commit is contained in:
parent
f7d7a289f3
commit
d70332dd68
2 changed files with 2 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ private[parser] trait SimpleHeaders { this: Parser with CommonRules with CommonA
|
|||
|
||||
// https://tools.ietf.org/html/rfc6265#section-4.2
|
||||
def `cookie` = rule {
|
||||
oneOrMore(`cookie-pair`).separatedBy(ws(';')) ~ EOI ~> (`Cookie`(_))
|
||||
oneOrMore(`cookie-pair`).separatedBy((ch(';') | ch(',')) ~ OWS) ~ EOI ~> (`Cookie`(_))
|
||||
}
|
||||
|
||||
// http://tools.ietf.org/html/rfc7231#section-7.1.1.2
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ class HttpHeaderSpec extends FreeSpec with Matchers {
|
|||
"Cookie: a=1;b=2" =!= Cookie(HttpCookie("a", "1"), HttpCookie("b", "2")).renderedTo("a=1; b=2")
|
||||
"Cookie: a=1 ;b=2" =!= Cookie(HttpCookie("a", "1"), HttpCookie("b", "2")).renderedTo("a=1; b=2")
|
||||
"Cookie: a=1; b=2" =!= Cookie(HttpCookie("a", "1"), HttpCookie("b", "2"))
|
||||
"Cookie: a=1,b=2" =!= Cookie(HttpCookie("a", "1"), HttpCookie("b", "2")).renderedTo("a=1; b=2")
|
||||
Cookie(HttpCookie("SID", "31d4d96e407aad42",
|
||||
domain = Some("example.com"),
|
||||
expires = Some(DateTime(2021, 6, 9, 10, 18, 14)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue