0

I have tried

val r = Http.configure(_ setFollowRedirects true)(svc OK as.String)

It worked though, but it started giving OutOfMemory error saying too many open files on system etc. Is there any way to set max redirect-limit and close the connection to prevent OOM error. Please suggest. Thanks..

Ref URL:How do I use Scala dispatch to get the URL returned in a 301 redirect?

Community
  • 1
  • 1

1 Answers1

0

Obviously with setting maxRedirects in the config. But then, this is just a security. You'd better try to understand why you end up with a endless redirect loop and fix it.

Stephane Landelle
  • 6,990
  • 2
  • 23
  • 29