skinny-framework / skinny-framework

:monorail: "Scala on Rails" - A full-stack web app framework for rapid development in Scala

Home Page:https://skinny-framework.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skinny-http-client can not parse `Set-Cookie` what contains path atribute

gakuzzzz opened this issue · comments

setCookie.split("=") match {
case Array(name, _) => Some(name -> setCookie)

            setCookie.split("=") match {
              case Array(name, _) => Some(name -> setCookie)

When setCookie contains path like as Set-Cookie: foo=bar; path=/; HttpOnly,
setCookie.split("=") returns an array that has 3 elements. Array("foo", "bar; path", "/; HttpOnly")

Should it split("=", 2) ?

Thank you. If you have time, please fix this 🙇
I will be able to immediately do the next patch release.

Thank you. The code just failed to extract cookie names and return the header value as-is. Just fixing it as @gakuzzzz suggested should be enough in this case.