Skip to content

Commit

Permalink
Update HeaderManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Dec 22, 2023
1 parent aa41a63 commit 019fec5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/manager/HeaderManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static String getLatestHeaderFromHistory(String shortUrl,String headerNam
for (int i=historyMessages.length-1; i>=0; i--) {
IHttpRequestResponse historyMessage = historyMessages[i];
String hisShortUrl = HelperPlus.getShortURL(historyMessage).toString();
HelperPlus.removeDefaultPort(hisShortUrl);
hisShortUrl = HelperPlus.removeDefaultPort(hisShortUrl);
if (hisShortUrl.equalsIgnoreCase(shortUrl)) {
String headerLine = getter.getHeaderLine(true,historyMessage,headerName);
return headerLine;
Expand All @@ -88,7 +88,7 @@ public static String getLatestHeaderFromSiteMap(String shortUrl,String headerNam
for (int i=historyMessages.length-1; i>=0; i--) {
IHttpRequestResponse historyMessage = historyMessages[i];
String hisShortUrl = HelperPlus.getShortURL(historyMessage).toString();
HelperPlus.removeDefaultPort(hisShortUrl);
hisShortUrl = HelperPlus.removeDefaultPort(hisShortUrl);
if (hisShortUrl.equalsIgnoreCase(shortUrl)) {
String headerLine = getter.getHeaderLine(true,historyMessage,headerName);
return headerLine;
Expand Down Expand Up @@ -192,10 +192,12 @@ public static IHttpRequestResponse checkURLBasedRuleAndTakeAction(ConfigEntry ru

String fullUrl = getter.getFullURL(messageInfo).toString();
String targetShortUrl = HelperPlus.getShortURL(messageInfo).toString();
targetShortUrl = HelperPlus.removeDefaultPort(targetShortUrl);
String host = HelperPlus.getHost(messageInfo);


String rulekey = rule.getKey();
rulekey = HelperPlus.removeDefaultPort(rulekey);
String rulevalue = rule.getValue();

if (rulekey.equalsIgnoreCase(targetShortUrl) ||
Expand Down

0 comments on commit 019fec5

Please sign in to comment.