Skip to content

Commit b228e91

Browse files
committed
Upgrade undertow to 2.2.3
Undertow's cookie handling changed slightly in this version, which prompted two changes: 1. the SameSite cookie no longer accepts null as an argument. Rather than adding conditionals to guard setting, we simply change the default SameSite value to 'Lax', as is assumed by modern standards anyway https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite: > The cookie-sending behavior if SameSite is not specified is SameSite=Lax. > Previously the default was that cookies were sent for all requests. 2. it no longer handles spaces in cookie values (unless they are quoted). This behavior is actually correct according to [RFC2109](https://tools.ietf.org/html/rfc2109), which requires cookie values to be quoted if they contain spaces. This change is actually transparent to cask, but reveals a minor bug in the [requests-scala](com-lihaoyi/requests-scala#73) library. Tests pass locally once this issue is fixed.
1 parent 2c5df2e commit b228e91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ trait CaskModule extends CrossScalaModule with PublishModule{
5050
class CaskMainModule(val crossScalaVersion: String) extends CaskModule {
5151
def ivyDeps = T{
5252
Agg(
53-
ivy"io.undertow:undertow-core:2.0.13.Final",
53+
ivy"io.undertow:undertow-core:2.2.3.Final",
5454
ivy"com.lihaoyi::upickle:1.2.2"
5555
) ++
5656
(if(!isDotty) Agg(ivy"org.scala-lang:scala-reflect:${scalaVersion()}") else Agg())

cask/src/cask/model/Params.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ case class Cookie(name: String,
8181
discard: Boolean = false,
8282
httpOnly: Boolean = false,
8383
secure: Boolean = false,
84-
sameSite: String = null) {
84+
sameSite: String = "Lax") {
8585

8686
}
8787

0 commit comments

Comments
 (0)