Copilot commented on code in PR #13820:
URL: https://github.com/apache/trafficserver/pull/13820#discussion_r4441036107


##########
src/proxy/http/HttpSM.cc:
##########
@@ -6712,7 +6713,13 @@ HttpSM::handle_server_setup_error(int event, void *data)
     t_state.set_connect_fail(EPIPE);
     break;
   case VC_EVENT_ERROR:
-    t_state.current.state = HttpTransact::CONNECTION_ERROR;
+    // A QUERY body may have been consumed before a TLS read error. Only an
+    // admitted not-processed retry can rearm it after the request was sent.
+    if (t_state.method == HTTP_WKSIDX_QUERY && server_request_hdr_bytes > 0) {
+      t_state.current.state = this->prepare_for_origin_retry() ? 
HttpTransact::CONNECTION_ERROR : HttpTransact::CONNECTION_CLOSED;

Review Comment:
   `server_request_hdr_bytes` is populated before I/O, so this condition also 
matches a first write that fails without sending any bytes. For an HTTP/1 
origin, `prepare_for_origin_retry()` returns false, converting that failure 
into `CONNECTION_CLOSED` and rejecting a retry of the still-intact QUERY. Track 
actual header-write progress separately from the queued length, and preserve 
the `CONNECTION_ERROR` retry path when nothing was sent.



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