Browse Source

cherry-pick [Alert] [HTTP Plugin] Lose HTTP port

#14341
3.1.8-release
旺阳 1 year ago committed by zhuangchong
parent
commit
64e81c0e83
  1. 7
      dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java

7
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java

@ -113,7 +113,8 @@ public final class HttpSender {
//GET request add param in url
setMsgInUrl(msg);
URL unencodeUrl = new URL(url);
URI uri = new URI(unencodeUrl.getProtocol(), unencodeUrl.getHost(), unencodeUrl.getPath(), unencodeUrl.getQuery(), null);
URI uri = new URI(unencodeUrl.getProtocol(), unencodeUrl.getAuthority(), unencodeUrl.getPath(),
unencodeUrl.getQuery(), null);
httpRequest = new HttpGet(uri);
setHeader();
@ -164,4 +165,8 @@ public final class HttpSender {
logger.error("send http alert msg exception : {}", e.getMessage());
}
}
public String getRequestUrl() {
return httpRequest.getURI().toString();
}
}

Loading…
Cancel
Save