From b521b80f3e61a8be38146325e263a5696aae69fc Mon Sep 17 00:00:00 2001 From: Terence Tuhinanshu Date: Mon, 6 May 2024 10:37:08 -0400 Subject: [PATCH 1/2] Fix maxlen config This was changed in AkkaHttp 10.5. Without this, requests for HUC-8s were failing. --- api/src/main/resources/application.conf | 8 ++++---- api/src/main/scala/Utils.scala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/main/resources/application.conf b/api/src/main/resources/application.conf index 4b2d811..f58125e 100644 --- a/api/src/main/resources/application.conf +++ b/api/src/main/resources/application.conf @@ -13,9 +13,9 @@ akka.http { idle-timeout = ${?MMW_GEOPROCESSING_TIMEOUT} request-timeout = 120 s request-timeout = ${?MMW_GEOPROCESSING_TIMEOUT} - } - parsing { - max-content-length = 50m - max-content-length = ${?MMW_GEOPROCESSING_MAXLEN} + parsing { + max-content-length = 50m + max-content-length = ${?MMW_GEOPROCESSING_MAXLEN} + } } } diff --git a/api/src/main/scala/Utils.scala b/api/src/main/scala/Utils.scala index 4b01dc6..e4090fe 100644 --- a/api/src/main/scala/Utils.scala +++ b/api/src/main/scala/Utils.scala @@ -253,7 +253,7 @@ trait Utils { val host = config.getString("geoprocessing.hostname") val port = config.getString("geoprocessing.port") val timeout = config.getString("akka.http.server.request-timeout") - val maxlen = config.getString("akka.http.parsing.max-content-length") + val maxlen = config.getString("akka.http.server.parsing.max-content-length") println("Initializing mmw-geoprocessing with these variables:") println(s"MMW_GEOPROCESSING_HOST $host") From b88e56f2a0d8c695d20f0f6f505ea3ff025fbd9e Mon Sep 17 00:00:00 2001 From: Terence Tuhinanshu Date: Mon, 6 May 2024 12:07:16 -0400 Subject: [PATCH 2/2] 6.1.0 --- CHANGELOG.md | 5 +++++ build.sbt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c036450..32c8574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 6.1.0 + +- Updates max content length configuration for Akka Http 10.5, + allowing for HUC-8 requests + ## 6.0.0 - Upgrades the GeoTrellis library to `3.7.0`, the latest at this time diff --git a/build.sbt b/build.sbt index d6a2887..1ba05ba 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ licenses := Seq( scalaVersion := Version.scala ThisBuild / scalaVersion := Version.scala -ThisBuild / version := "6.0.0" +ThisBuild / version := "6.1.0" lazy val root = Project("mmw-geoprocessing", file(".")) .aggregate(