bneradt commented on code in PR #13667:
URL: https://github.com/apache/trafficserver/pull/13667#discussion_r3982963683


##########
src/proxy/http/HttpSM.cc:
##########
@@ -5650,6 +5663,9 @@ HttpSM::open_prewarmed_connection()
 void
 HttpSM::do_http_server_open(bool raw, bool only_direct)
 {
+  // A failed new attempt must not report a previous origin's TCP_INFO.
+  server_tcp_info.reset();

Review Comment:
   [P2] Clear the sample when following a redirect to a cached response
   
   The reset points miss an internally followed redirect whose target is 
already fresh in cache. With number_of_redirections enabled and 
redirect_use_orig_cache_key=0, an origin 302 populates server_tcp_info and 
do_redirect() logs that response, then redirect_request() reuses the same 
HttpSM. HandleRequest() can proceed directly to CACHE_LOOKUP and serve the 
target without DNS_LOOKUP, do_http_server_open(), or 
setup_server_read_response_header(), so the final cache-hit log incorrectly 
repeats the redirect origin's srtt/srtv/sret/scwn instead of -1. Please clear 
the snapshot when beginning the redirected request, after logging the redirect 
response, and add a replay case that primes the target in cache before 
following an origin redirect to it.



-- 
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