Skip to content

Commit 9bb7c16

Browse files
author
Karthik Thirumalasetti
committed
changes
1 parent ea6e225 commit 9bb7c16

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/io/appsfly/core/AppInstance.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ public void onFailure(Call call, IOException e) {
6060
public void onResponse(Call call, final okhttp3.Response response) throws IOException {
6161
String checksum = response.headers().get("X-Checksum");
6262
if(checksum!=null){
63-
boolean verified = CtyptoUtil.getInstance().verifychecksum(response.body().bytes(), checksum, config.secretKey);
63+
byte[] bytes = response.body().bytes();
64+
boolean verified = CtyptoUtil.getInstance().verifychecksum(bytes, checksum, config.secretKey);
6465
if (verified){
65-
callback.onResponse(new JSONObject(response.body().bytes()));
66+
callback.onResponse(new JSONObject(bytes));
6667
}
6768
else{
6869
callback.onError(new JSONObject(){{

0 commit comments

Comments
 (0)