Skip to content

Commit 7bf44b1

Browse files
committed
2 parents f8aacca + 422c1f8 commit 7bf44b1

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
@@ -108,9 +108,10 @@ public JSONObject execSync(final String intent, final JSONObject intentData, fin
108108
final Response response = httpClient.newCall(request).execute();
109109
String responseChecksum = response.headers().get("X-Checksum");
110110
if(responseChecksum!=null){
111-
boolean verified = CtyptoUtil.getInstance().verifychecksum(response.body().bytes(), responseChecksum, config.secretKey);
111+
byte[] bytes = response.body().bytes();
112+
boolean verified = CtyptoUtil.getInstance().verifychecksum(bytes, responseChecksum, config.secretKey);
112113
if (verified){
113-
return new JSONObject(response.body().bytes());
114+
return new JSONObject(bytes);
114115
}
115116
else{
116117
throw new AppsflyException("Checksum Validation Failed");

0 commit comments

Comments
 (0)