This is an automated email from the ASF dual-hosted git repository.

kerwin pushed a commit to branch 3.1.8-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit 64e81c0e836d0bd56b8efbf0dc61247666f0a635
Author: 旺阳 <[email protected]>
AuthorDate: Wed Jun 14 17:38:58 2023 +0800

    cherry-pick [Alert] [HTTP Plugin] Lose HTTP port
    #14341
---
 .../org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
 
b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
index bc603b91d8..017719c2f7 100644
--- 
a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
+++ 
b/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();
+    }
 }

Reply via email to