hnakamur commented on code in PR #12091:
URL: https://github.com/apache/trafficserver/pull/12091#discussion_r2008738206


##########
src/proxy/http/HttpTransact.cc:
##########
@@ -591,10 +591,9 @@ is_negative_caching_appropriate(HttpTransact::State *s)
 inline static ResolveInfo::UpstreamResolveStyle
 find_server_and_update_current_info(HttpTransact::State *s)
 {
-  int         host_len;
-  const char *host = s->hdr_info.client_request.host_get(&host_len);
+  auto host{s->hdr_info.client_request.host_get()};
 
-  if (is_localhost(host, host_len)) {
+  if (is_localhost(host.data(), static_cast<int>(host.length()))) {

Review Comment:
   There is one test failure in 
https://ci.trafficserver.apache.org/job/Github_Builds/job/ubuntu/5645/console
   ```
   RPRINT HostDBProcessor: HostDBRecord hostname=127.0.0.1
   RPRINT HostDBProcessor: hostdbinfo RR0 ip=127.0.0.1
   RPRINT HostDBProcessor: HostDBTestRR: 0 outstanding 5 success 1 failure
       REGRESSION_RESULT HostDBProcessor:                          FAILED
   ```
   
   However it is not reproduced on my Ubuntu machine. I ran the following 
commands:
   ```
   cmake -B build --preset ci-ubuntu
   cmake --build build -j -v
   cmake --install build
   /tmp/ats/bin/traffic_server -K -k -R 1
   ```
   All tests passed.
   ```
   RPRINT HostDBProcessor: HostDBRecord hostname=127.0.0.1                      
                                                                                
                                                       RPRINT HostDBProcessor: 
hostdbinfo RR0 ip=127.0.0.1                                                     
                                                                                
                            RPRINT HostDBProcessor: HostDBTestRR: 0 outstanding 
6 success 0 failure                                                             
                                                                                
    REGRESSION_RESULT HostDBProcessor:                          PASSED
   ...(snip)...
   REGRESSION_TEST DONE: PASSED
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to