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

hello-stephen pushed a commit to branch agent/branch41-fix-http-tvf-host
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 522293906e9da20680acfa59058ee0ea51472897
Author: lidongyang <[email protected]>
AuthorDate: Wed Jul 22 15:09:00 2026 +0800

    [branch-4.1][fix](regression) Avoid loopback HTTP TVF host
---
 regression-test/suites/external_table_p0/tvf/test_http_tvf.groovy | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/regression-test/suites/external_table_p0/tvf/test_http_tvf.groovy 
b/regression-test/suites/external_table_p0/tvf/test_http_tvf.groovy
index 4eb7f5612b8..23a0b8b2c2b 100644
--- a/regression-test/suites/external_table_p0/tvf/test_http_tvf.groovy
+++ b/regression-test/suites/external_table_p0/tvf/test_http_tvf.groovy
@@ -144,9 +144,11 @@ suite("test_http_tvf", "p2") {
     String httpServerHost = context.config.otherConfigs.get("httpTvfHost")
     if (httpServerHost == null || httpServerHost.trim().isEmpty()) {
         httpServerHost = context.config.otherConfigs.get("externalEnvIp")
-    }
-    if (httpServerHost == null || httpServerHost.trim().isEmpty()) {
-        httpServerHost = InetAddress.getLocalHost().getHostAddress()
+        if (httpServerHost == null || httpServerHost.trim().isEmpty()
+                || InetAddress.getByName(httpServerHost).isLoopbackAddress()
+                || InetAddress.getByName(httpServerHost).isAnyLocalAddress()) {
+            httpServerHost = InetAddress.getLocalHost().getHostAddress()
+        }
     }
     String httpBaseUrl = "http://${httpServerHost}:${httpServer.address.port}";
     def httpUrl = { String relativePath -> "${httpBaseUrl}/${relativePath}" }


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

Reply via email to