Skip to content

Commit 422c1f8

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

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
@@ -104,9 +104,10 @@ public JSONObject execSync(final String intent, final JSONObject intentData, fin
104104
final Response response = httpClient.newCall(request).execute();
105105
String responseChecksum = response.headers().get("X-Checksum");
106106
if(responseChecksum!=null){
107-
boolean verified = CtyptoUtil.getInstance().verifychecksum(response.body().bytes(), responseChecksum, config.secretKey);
107+
byte[] bytes = response.body().bytes();
108+
boolean verified = CtyptoUtil.getInstance().verifychecksum(bytes, responseChecksum, config.secretKey);
108109
if (verified){
109-
return new JSONObject(response.body().bytes());
110+
return new JSONObject(bytes);
110111
}
111112
else{
112113
throw new AppsflyException("Checksum Validation Failed");

0 commit comments

Comments
 (0)