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

liaoxin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 02b430ea667 [fix](load) fix S3 load cannot use HTTPS protocol for 
loading data (#51219)
02b430ea667 is described below

commit 02b430ea667846856abde1988198dc3bfef4c5ba
Author: Xin Liao <[email protected]>
AuthorDate: Tue Jun 17 17:52:14 2025 +0800

    [fix](load) fix S3 load cannot use HTTPS protocol for loading data (#51219)
---
 fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
index a3e97d3a79d..7a554bac0d9 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LoadStmt.java
@@ -570,7 +570,11 @@ public class LoadStmt extends DdlStmt implements 
NotFallbackInParser {
     private void checkEndpoint(String endpoint) throws UserException {
         HttpURLConnection connection = null;
         try {
-            String urlStr = "http://"; + endpoint;
+            String urlStr = endpoint;
+            // Add default protocol if not specified
+            if (!endpoint.startsWith("http://";) && 
!endpoint.startsWith("https://";)) {
+                urlStr = "http://"; + endpoint;
+            }
             SecurityChecker.getInstance().startSSRFChecking(urlStr);
             URL url = new URL(urlStr);
             connection = (HttpURLConnection) url.openConnection();
@@ -627,6 +631,8 @@ public class LoadStmt extends DdlStmt implements 
NotFallbackInParser {
     }
 
     public void checkWhiteList(String endpoint) throws UserException {
+        endpoint = endpoint.replaceFirst("^http://";, "");
+        endpoint = endpoint.replaceFirst("^https://";, "");
         List<String> whiteList = new 
ArrayList<>(Arrays.asList(Config.s3_load_endpoint_white_list));
         whiteList.removeIf(String::isEmpty);
         if (!whiteList.isEmpty() && !whiteList.contains(endpoint)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to