Skip to content

Commit

Permalink
Remove simple compilation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dlecan committed Jan 14, 2017
1 parent 04d2d54 commit d394954
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ abstract class Play2GenericServletRequestHandler(val servletRequest: HttpServlet

val flashCookie = {
header.headers.get(HeaderNames.SET_COOKIE)
.map(Cookies.decode)
.map(Cookies.decodeSetCookieHeader)
.flatMap(_.find(_.name == Flash.COOKIE_NAME)).orElse {
Option(requestHeader.flash).filterNot(_.isEmpty).map { _ =>
Flash.discard.toCookie
Expand All @@ -327,7 +327,7 @@ abstract class Play2GenericServletRequestHandler(val servletRequest: HttpServlet
}

flashCookie.fold(result) { newCookie =>
result.withHeaders(HeaderNames.SET_COOKIE -> Cookies.merge(header.headers.getOrElse(HeaderNames.SET_COOKIE, ""), Seq(newCookie)))
result.withHeaders(HeaderNames.SET_COOKIE -> Cookies.mergeSetCookieHeader(header.headers.getOrElse(HeaderNames.SET_COOKIE, ""), Seq(newCookie)))
}
}

Expand Down

0 comments on commit d394954

Please sign in to comment.