Skip to content

Commit

Permalink
fix: ignore redirect statuses in Ktor engine (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianbotsf authored Feb 15, 2022
1 parent 158353e commit 6265f51
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ actual class KtorEngine actual constructor(

// do not throw exceptions if status code < 300, error handling is expected by generated clients
expectSuccess = false

// do not attempt to follow redirects for status codes like 301 because they should be handled higher up
followRedirects = false
}

private val logger = Logger.getLogger<KtorEngine>()

// TODO: Remove following annotation after https://youtrack.jetbrains.com/issue/KTOR-3001 is resolved
Expand Down

0 comments on commit 6265f51

Please sign in to comment.