From 1303c154bdd16d5cc0e884b0caf4c51549142dfe Mon Sep 17 00:00:00 2001 From: Matteo Bitussi Date: Thu, 7 Mar 2024 11:35:42 +0100 Subject: [PATCH] fix: passive won't match messages --- tool/src/main/java/migt/HTTPReqRes.java | 2 +- tool/src/main/java/migt/Test.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/src/main/java/migt/HTTPReqRes.java b/tool/src/main/java/migt/HTTPReqRes.java index 5edebcd..d5db46e 100644 --- a/tool/src/main/java/migt/HTTPReqRes.java +++ b/tool/src/main/java/migt/HTTPReqRes.java @@ -857,7 +857,7 @@ public boolean matches_msg_type(MessageType msg_type, boolean is_request) { ); } else { // this check is done to avoid matching request messages when intercepting a response - if (is_request != msg_type.isRequest) return false; + if (is_request != msg_type.msg_to_process_is_request) return false; if (!msg_type.isRequest && !isResponse) return false; // this message is not containing a response matchedMessage = Tools.executeChecks( msg_type.checks, diff --git a/tool/src/main/java/migt/Test.java b/tool/src/main/java/migt/Test.java index bb39be7..9854fdf 100644 --- a/tool/src/main/java/migt/Test.java +++ b/tool/src/main/java/migt/Test.java @@ -449,7 +449,7 @@ public boolean execute(List messageList, currentOP.api.vars = vars; } - if (messageList.get(i).matches_msg_type(msg_type, currentOP.api.is_request)) { + if (messageList.get(i).matches_msg_type(msg_type, msg_type.msg_to_process_is_request)) { currentOP.setAPI(new Operation_API(messageList.get(i), msg_type.msg_to_process_is_request)); currentOP.execute(); res = currentOP.getResult();