diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/pages/AnkiServer.kt b/AnkiDroid/src/main/java/com/ichi2/anki/pages/AnkiServer.kt index a68b6bb2baac..b45b3da77440 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/pages/AnkiServer.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/pages/AnkiServer.kt @@ -98,13 +98,6 @@ open class AnkiServer( } } - fun getSessionBytes(session: IHTTPSession): ByteArray { - val contentLength = session.headers["content-length"]!!.toInt() - val bytes = ByteArray(contentLength) - session.inputStream.read(bytes, 0, contentLength) - return bytes - } - fun buildResponse( block: suspend CoroutineScope.() -> ByteArray ): Response { @@ -135,6 +128,13 @@ open class AnkiServer( } } + fun getSessionBytes(session: IHTTPSession): ByteArray { + val contentLength = session.headers["content-length"]!!.toInt() + val bytes = ByteArray(contentLength) + session.inputStream.read(bytes, 0, contentLength) + return bytes + } + fun newChunkedResponse( data: ByteArray?, mimeType: String = "application/binary",