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


##########
plugins/slice/client.cc:
##########
@@ -93,6 +93,12 @@ handle_client_req(TSCont contp, TSEvent event, Data *const 
data)
 
     header.setKeyVal(TS_MIME_FIELD_HOST, TS_MIME_LEN_HOST, data->m_hostname, 
data->m_hostlen);
 
+    // Slice never sends a request body on the internal connection. Drop any
+    // body-declaring fields so the internal transaction does not wait for a
+    // body that will never arrive.
+    header.removeKey(TS_MIME_FIELD_CONTENT_LENGTH, TS_MIME_LEN_CONTENT_LENGTH);
+    header.removeKey(TS_MIME_FIELD_TRANSFER_ENCODING, 
TS_MIME_LEN_TRANSFER_ENCODING);

Review Comment:
   `removeKey()` only finds one field and `TSMimeHdrFieldRemove()` explicitly 
detaches only that duplicate (`src/api/InkAPI.cc:1808-1829`). ATS accepts 
multiple `Transfer-Encoding` fields when each value is `chunked` 
(`src/proxy/hdrs/HTTP.cc:1891-1909`), so a repeated header leaves one 
`Transfer-Encoding` on the internal request. With the write side now kept open, 
that transaction can wait indefinitely for a chunked body. Remove every 
duplicate (preferably by making the helper iterate the duplicate chain) and add 
a repeated-header regression case.



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