From fe4935f9f92305c699b7665ccc44698f39fd9151 Mon Sep 17 00:00:00 2001 From: Joshua Wiedekopf Date: Tue, 7 Sep 2021 16:33:10 +0200 Subject: [PATCH] fix redirect issue (#4) * fix redirect issue * bump version --- build.gradle.kts | 2 +- src/main/kotlin/de/uzl/itcr/termicron/StaticHelpers.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index ab1a816..a37feae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ application { } group = "de.uzl.itcr" -version = "1.0.0" +version = "1.0.1" java.sourceCompatibility = JavaVersion.VERSION_11 repositories { diff --git a/src/main/kotlin/de/uzl/itcr/termicron/StaticHelpers.kt b/src/main/kotlin/de/uzl/itcr/termicron/StaticHelpers.kt index fd61f44..34a457b 100644 --- a/src/main/kotlin/de/uzl/itcr/termicron/StaticHelpers.kt +++ b/src/main/kotlin/de/uzl/itcr/termicron/StaticHelpers.kt @@ -36,6 +36,7 @@ class StaticHelpers { fun httpClient(initializer: (HttpClient.Builder.() -> Unit)? = null): HttpClient = HttpClient.newBuilder().apply { version(HttpClient.Version.HTTP_1_1) + followRedirects(HttpClient.Redirect.ALWAYS) initializer?.invoke(this) } .connectTimeout(Duration.ofSeconds(20))