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

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


The following commit(s) were added to refs/heads/master by this push:
     new 24551fe18f Fix DNS error logging to use ERR_DNS_FAIL (#12638)
24551fe18f is described below

commit 24551fe18f15f02a990f3d0a50912c4595aef7d2
Author: Brian Neradt <[email protected]>
AuthorDate: Tue Nov 4 16:54:59 2025 -0600

    Fix DNS error logging to use ERR_DNS_FAIL (#12638)
    
    Fixed a pointer comparison bug where the error_body_type string literal
    was compared by pointer address instead of value. This now passes the
    Dns_error_body constant directly so the pointer comparison succeeds and
    DNS errors are correctly logged as ERR_DNS_FAIL.
---
 src/proxy/http/HttpTransact.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index e8d53be3f3..2fa301a780 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -1916,7 +1916,7 @@ HttpTransact::OSDNSLookup(State *s)
       SET_VIA_STRING(VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_NO_FORWARD);
       if (!s->dns_info.record || s->dns_info.record->is_failed()) {
         // Set to internal server error so later logging will pick up 
SquidLogCode::ERR_DNS_FAIL
-        build_error_response(s, HTTPStatus::INTERNAL_SERVER_ERROR, "Cannot 
find server.", "connect#dns_failed");
+        build_error_response(s, HTTPStatus::INTERNAL_SERVER_ERROR, "Cannot 
find server.", Dns_error_body);
         log_msg = "looking up";
       } else {
         build_error_response(s, HTTPStatus::INTERNAL_SERVER_ERROR, "No valid 
server.", "connect#all_down");

Reply via email to