From 5213814f1a38d9affa744f632ee9b197295d493b Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 3 Feb 2021 10:16:43 +0100 Subject: [PATCH] Update http4s-blaze-client, ... to 0.21.17 (#443) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update http4s-blaze-client, ... to 0.21.17 * fix!: Remove nio2 configuration after http4s blaze upgrade feat: Add configuration for maxConnections BREAKING CHANGE: nio2 is no longer available for blaze server * chore: Update http4s version * Revert "chore: Update http4s version" This reverts commit b26f0f88π Co-authored-by: Janecek Jakub --- .../com/avast/sst/http4s/server/Http4sBlazeServerConfig.scala | 4 ++-- .../com/avast/sst/http4s/server/Http4sBlazeServerModule.scala | 2 +- project/Dependencies.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerConfig.scala b/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerConfig.scala index a46146fa1..f34423f3b 100644 --- a/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerConfig.scala +++ b/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerConfig.scala @@ -10,16 +10,16 @@ import scala.concurrent.duration.{Duration, FiniteDuration} final case class Http4sBlazeServerConfig( listenAddress: String, listenPort: Int, - nio2Enabled: Boolean = true, webSocketsEnabled: Boolean = false, http2Enabled: Boolean = false, responseHeaderTimeout: FiniteDuration = Duration(defaults.ResponseTimeout.toNanos, TimeUnit.NANOSECONDS), idleTimeout: FiniteDuration = Duration(defaults.IdleTimeout.toNanos, TimeUnit.NANOSECONDS), bufferSize: Int = 64 * 1024, maxRequestLineLength: Int = 4 * 1024, - maxHeadersLength: Int = 40 * 1024, + maxHeadersLength: Int = defaults.MaxHeadersSize, chunkBufferMaxSize: Int = 1024 * 1024, connectorPoolSize: Int = channel.DefaultPoolSize, + maxConnections: Int = defaults.MaxConnections, socketOptions: SocketOptions = SocketOptions() ) diff --git a/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerModule.scala b/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerModule.scala index c18082429..ab252d4f1 100644 --- a/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerModule.scala +++ b/http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server/Http4sBlazeServerModule.scala @@ -31,7 +31,6 @@ object Http4sBlazeServerModule { .bindSocketAddress(inetSocketAddress) .withHttpApp(httpApp) .withoutBanner - .withNio2(config.nio2Enabled) .withWebSockets(config.webSocketsEnabled) .enableHttp2(config.http2Enabled) .withResponseHeaderTimeout(Duration.fromNanos(config.responseHeaderTimeout.toNanos)) @@ -41,6 +40,7 @@ object Http4sBlazeServerModule { .withMaxHeadersLength(config.maxHeadersLength) .withChunkBufferMaxSize(config.chunkBufferMaxSize) .withConnectorPoolSize(config.connectorPoolSize) + .withMaxConnections(config.maxConnections) .withChannelOption[java.lang.Boolean](StandardSocketOptions.TCP_NODELAY, config.socketOptions.tcpNoDelay) .resource } yield server diff --git a/project/Dependencies.scala b/project/Dependencies.scala index e44f6b7b1..119c1dff6 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -47,7 +47,7 @@ object Dependencies { val datastaxJavaDriverCore = "4.10.0" val doobie = "0.10.0" val grpc = "1.35.0" - val http4s = "0.21.16" + val http4s = "0.21.17" val micrometerCore = "1.6.3" val micrometerJmx = "1.6.3" val micrometerStatsD = "1.6.3"