From f6723117bed05cfa99e0afaa886aa7d73e440925 Mon Sep 17 00:00:00 2001 From: Sergii Mikhtoniuk Date: Wed, 15 Jul 2020 15:21:51 -0700 Subject: [PATCH] Follow redirects --- .../src/main/scala/dev/kamu/cli/ingest/fetch/HTTPSource.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core.coordinator/src/main/scala/dev/kamu/cli/ingest/fetch/HTTPSource.scala b/core.coordinator/src/main/scala/dev/kamu/cli/ingest/fetch/HTTPSource.scala index 7ac3b50b7b..a04ae35715 100644 --- a/core.coordinator/src/main/scala/dev/kamu/cli/ingest/fetch/HTTPSource.scala +++ b/core.coordinator/src/main/scala/dev/kamu/cli/ingest/fetch/HTTPSource.scala @@ -16,7 +16,7 @@ import java.time.format.DateTimeFormatter import dev.kamu.cli.ingest.ExecutionResult import dev.kamu.core.utils.Clock -import scalaj.http.Http +import scalaj.http.{Http, HttpOptions} class HTTPSource( val sourceID: String, @@ -41,6 +41,7 @@ class HTTPSource( ) var request = Http(url.toString) + .option(HttpOptions.followRedirects(true)) .timeout(connTimeoutMs = 30 * 1000, readTimeoutMs = 30 * 1000) .method("GET")