Clyde
02/07/2020, 1:14 AMio.ktor.server.engine.BaseApplicationResponse$ResponseAlreadySentException: Response has already been sent
at io.ktor.server.engine.BaseApplicationResponse.commitHeaders (BaseApplicationResponse.kt:44)
at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent$suspendImpl (BaseApplicationResponse.kt:108)
at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent (BaseApplicationResponse.kt)
The code generating the response is:
call.respondRedirect(signedUrl)
where signedUrl
is a string with a URL. The redirect works - the client gets the correct result and redirects to the new path. Just wondering why there is an exception.rocketraman
02/07/2020, 6:31 PMClyde
02/08/2020, 9:30 AMrespond()
on the ApplicationCall
twice, the second time was with the return value of a function which was Unit
. Seems that respond(Unit)
actually sends something which was unexpected.