From 94570fd57e63f8a0964031a0e1ed20abf9697ed2 Mon Sep 17 00:00:00 2001 From: Michael Rahn Date: Wed, 12 Jan 2022 16:20:36 +0100 Subject: [PATCH] fix(android): Ensure base64 encoded response has no wrap. resolves #219 --- .../java/com/getcapacitor/plugin/http/HttpRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/getcapacitor/plugin/http/HttpRequestHandler.java b/android/src/main/java/com/getcapacitor/plugin/http/HttpRequestHandler.java index 215beb51..4771532c 100644 --- a/android/src/main/java/com/getcapacitor/plugin/http/HttpRequestHandler.java +++ b/android/src/main/java/com/getcapacitor/plugin/http/HttpRequestHandler.java @@ -327,7 +327,7 @@ private static String readStreamAsBase64(InputStream in) throws IOException { out.write(buffer, 0, readBytes); } byte[] result = out.toByteArray(); - return Base64.encodeToString(result, 0, result.length, Base64.DEFAULT); + return Base64.encodeToString(result, 0, result.length, Base64.NO_WRAP); } }