aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala')
-rw-r--r--core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala b/core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala
index accd6b5..3b88850 100644
--- a/core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala
+++ b/core/src/main/scala/com/softwaremill/sttp/FollowRedirectsBackend.scala
@@ -32,7 +32,8 @@ class FollowRedirectsBackend[R[_], S](delegate: SttpBackend[R, S])
response.header(LocationHeader).fold(responseMonad.unit(response)) { loc =>
if (redirects >= FollowRedirectsBackend.MaxRedirects) {
- responseMonad.unit(Response(Left("Too many redirects"), 0, Nil, Nil))
+ responseMonad.unit(
+ Response(Left("Too many redirects"), 0, "", Nil, Nil))
} else {
followRedirect(request, response, redirects, loc)
}