Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update http4s-circe, http4s-core, ... to 0.23.15 #1272

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import io.chrisdavenport.log4cats.slf4j.Slf4jLogger
import org.http4s._
import org.http4s.dsl.Http4sDsl
import org.http4s.implicits.{http4sLiteralsSyntax => _, _}
import org.http4s.server.blaze._
import org.http4s.blaze.server._
import org.http4s.server.middleware._
import org.http4s.server.{Router, Server => HTTP4sServer}
import sttp.client.SttpBackend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import cats.effect.Sync
import cats.syntax.functor._
import io.chrisdavenport.log4cats.Logger
import io.circe.syntax._
import org.http4s.util.CaseInsensitiveString
import org.http4s.{HttpRoutes, Request}

import java.time.Instant
import org.typelevel.ci.CIString

class AccessLoggingMiddleware[F[_]: Sync](
service: HttpRoutes[F],
Expand All @@ -21,13 +21,13 @@ class AccessLoggingMiddleware[F[_]: Sync](
else {
Kleisli { (request: Request[F]) =>
val requestStart = Instant.now
val headerWhitelist: Set[CaseInsensitiveString] =
val headerWhitelist: Set[CIString] =
Set(
CaseInsensitiveString("user-agent"),
CaseInsensitiveString("accept-encoding"),
CaseInsensitiveString("referer"),
CaseInsensitiveString("origin"),
CaseInsensitiveString("X-Amzn-Trace-Id")
CIString("user-agent"),
CIString("accept-encoding"),
CIString("referer"),
CIString("origin"),
CIString("X-Amzn-Trace-Id")
)
val headers =
Map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import io.circe.syntax._
import org.http4s.circe.CirceEntityDecoder._
import org.http4s.circe.CirceEntityEncoder._
import org.http4s.implicits._
import org.http4s.util.CaseInsensitiveString
import org.http4s.{Method, Request, Uri}

import java.net.URLEncoder
import java.nio.charset.StandardCharsets
import org.typelevel.ci.CIString

/** Why sync? Because CirceEntityDecoder requires it :sad-trombone:
*
Expand Down Expand Up @@ -60,7 +60,7 @@ class TestClient[F[_]: Sync](
)
item <- resp.as[StacItem]
etag <- resp.headers
.find(h => h.name == CaseInsensitiveString("etag"))
.find(h => h.name == CIString("etag"))
.map(h => h.value.pure[F]) getOrElse {
MonadError[F, Throwable].raiseError(new Exception("No etag in response!"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.specs2.{ScalaCheck, Specification}

import java.net.URLEncoder
import java.nio.charset.StandardCharsets
import org.typelevel.ci._

class CollectionItemsServiceSpec
extends Specification
Expand Down Expand Up @@ -154,8 +155,8 @@ class CollectionItemsServiceSpec
val request = Request[IO](
method = Method.PUT,
Uri.unsafeFromString(s"/collections/$encodedCollectionId/items/$encodedItemId"),
headers = Headers.of(Header("If-Match", (if (mode == IfMatchMode.YOLO) { "*" }
else { s"$etag" })))
headers = Headers(Header("If-Match", (if (mode == IfMatchMode.YOLO) { "*" }
else { s"$etag" })))Header.Rawci"If-Match"
).withEntity(toUpdate)
(for {
response <- collectionItemsService.routes.run(request)
Expand Down Expand Up @@ -196,8 +197,8 @@ class CollectionItemsServiceSpec
val request = Request[IO](
method = Method.PATCH,
Uri.unsafeFromString(s"/collections/$encodedCollectionId/items/$encodedItemId"),
headers = Headers.of(Header("If-Match", (if (mode == IfMatchMode.YOLO) { "*" }
else { s"$etag" })))
headers = Headers(Header("If-Match", (if (mode == IfMatchMode.YOLO) { "*" }
else { s"$etag" })))Header.Rawci"If-Match"
).withEntity(patch)

(for {
Expand Down
2 changes: 1 addition & 1 deletion project/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Versions {
val GeoTrellisVersion = "3.6.0"
val GuavaVersion = "31.1-jre"
val HikariVersion = "4.0.3"
val Http4sVersion = "0.21.33"
val Http4sVersion = "0.23.15"
val JtsVersion = "1.16.1"
val LogbackVersion = "1.2.5"
val Log4CatsVersion = "1.1.1"
Expand Down