You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "hunter-cloud09 (via GitHub)" <gi...@apache.org> on 2023/08/28 05:13:08 UTC

[GitHub] [dolphinscheduler] hunter-cloud09 commented on a diff in pull request #14793: fix(dolphinscheduler-alert): fix create http request error

hunter-cloud09 commented on code in PR #14793:
URL: https://github.com/apache/dolphinscheduler/pull/14793#discussion_r1306915613


##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java:
##########
@@ -139,7 +141,11 @@ private void setMsgInUrl(String msg) {
             if (!url.contains(URL_SPLICE_CHAR)) {
                 type = URL_SPLICE_CHAR;
             }
-            url = String.format("%s%s%s=%s", url, type, contentField, msg);
+            try {
+                url = String.format("%s%s%s=%s", url, type, contentField, URLEncoder.encode(msg, DEFAULT_CHARSET));

Review Comment:
   Hi, @Radeity @fuchanghai , If add this, Should I remove the 124 lines of code to construct the URL, and then directly construct the URI through url?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org