Skip to content

Commit 6c50aab

Browse files
chuchuvaath0mas
authored andcommitted
Stop adding unnecessary new lines into base64 response string
base64.fromArrayBuffer is perfectly capable of decoding one long line of base64 string, see https://github.com/apache/cordova-js/blob/master/src/common/base64.js#L24
1 parent 59b804c commit 6c50aab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/com/silkimen/cordovahttp/CordovaHttpResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public JSONObject toJSON() throws JSONException {
7575
} else if (this.isFileOperation) {
7676
json.put("file", this.fileEntry);
7777
} else if (this.isRawResponse) {
78-
json.put("data", Base64.encodeToString(this.rawData, Base64.DEFAULT));
78+
json.put("data", Base64.encodeToString(this.rawData, Base64.NO_WRAP));
7979
} else {
8080
json.put("data", this.body);
8181
}

0 commit comments

Comments
 (0)