diff --git a/build.sbt b/build.sbt index 2952618..af0340b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ ThisBuild / tlBaseVersion := "0.5" -val http4sVersion = "0.23.16" -val natchezVersion = "0.3.0-M2" +val http4sVersion = "0.23.17" +val natchezVersion = "0.3.0-M3" val scala212Version = "2.12.17" val scala213Version = "2.13.10" val scala3Version = "3.2.1" diff --git a/modules/http4s/src/main/scala/natchez/http4s/syntax/EntryPointOps.scala b/modules/http4s/src/main/scala/natchez/http4s/syntax/EntryPointOps.scala index 7b05579..608586f 100644 --- a/modules/http4s/src/main/scala/natchez/http4s/syntax/EntryPointOps.scala +++ b/modules/http4s/src/main/scala/natchez/http4s/syntax/EntryPointOps.scala @@ -42,7 +42,7 @@ trait EntryPointOps[F[_]] { outer => Kleisli { req => val kernelHeaders = req.headers.headers .collect { - case header if isKernelHeader(header.name) => header.name.toString -> header.value + case header if isKernelHeader(header.name) => header.name -> header.value } .toMap @@ -139,4 +139,4 @@ trait ToEntryPointOps { } -object entrypoint extends ToEntryPointOps \ No newline at end of file +object entrypoint extends ToEntryPointOps diff --git a/modules/http4s/src/main/scala/natchez/http4s/syntax/KernelOps.scala b/modules/http4s/src/main/scala/natchez/http4s/syntax/KernelOps.scala index b948733..a588fb6 100644 --- a/modules/http4s/src/main/scala/natchez/http4s/syntax/KernelOps.scala +++ b/modules/http4s/src/main/scala/natchez/http4s/syntax/KernelOps.scala @@ -7,14 +7,13 @@ package natchez.http4s.syntax import natchez.Kernel import org.http4s.Headers import org.http4s.Header -import org.typelevel.ci.CIString trait KernelOps { def self: Kernel def toHttp4sHeaders: Headers = - Headers(self.toHeaders.map { case (k, v) => Header.Raw(CIString(k), v) } .toSeq) + Headers(self.toHeaders.map { case (k, v) => Header.Raw(k, v) } .toSeq) } @@ -30,7 +29,7 @@ trait KernelCompanionOps { def self: Kernel.type def fromHttp4sHeaders(headers: Headers): Kernel = - Kernel(headers.headers.map { h => h.name.toString -> h.value } .toMap) + Kernel(headers.headers.map(h => h.name -> h.value).toMap) } diff --git a/modules/http4s/src/test/scala/natchez/http4s/NatchezMiddlewareSuite.scala b/modules/http4s/src/test/scala/natchez/http4s/NatchezMiddlewareSuite.scala index d7ceec6..2588066 100644 --- a/modules/http4s/src/test/scala/natchez/http4s/NatchezMiddlewareSuite.scala +++ b/modules/http4s/src/test/scala/natchez/http4s/NatchezMiddlewareSuite.scala @@ -74,7 +74,7 @@ class NatchezMiddlewareSuite extends InMemorySuite { val expectedHistory = { val requestKernel = Kernel( - Map("X-Custom-Header" -> "external", "X-Correlation-Id" -> "id-123") + Map(CustomHeaderName -> "external", CorrelationIdName -> "id-123") ) val clientRequestTags = List( diff --git a/project/plugins.sbt b/project/plugins.sbt index f7e5358..f371ec1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.3") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.9") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.6")