Skip to content

Commit

Permalink
fix bug #94
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Dec 23, 2024
1 parent 2f1e40b commit 5da3750
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/config/ConfigEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,15 @@ public String getFinalValue(IHttpRequestResponse[] messageInfos) {
List<ConfigEntry> varConfigs = GUI.configTableModel.getBasicConfigVars();

for (String part : httpParts) {
valueStr = findAndReplace(valueStr, "{" + part + "}", getValueByPartType(messageInfos, part));
if (valueStr.toLowerCase().contains("{" + part.toLowerCase() + "}")){
//fix https://github.com/bit4woo/knife/issues/94
valueStr = findAndReplace(valueStr, "{" + part + "}", getValueByPartType(messageInfos, part));
}
}
for (ConfigEntry config : varConfigs) {
valueStr = findAndReplace(valueStr, "{" + config.getKey() + "}", config.getValue());
if (valueStr.toLowerCase().contains("{" + config.getKey() + "}")) {
valueStr = findAndReplace(valueStr, "{" + config.getKey() + "}", config.getValue());
}
}
return valueStr;
}
Expand Down

0 comments on commit 5da3750

Please sign in to comment.