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


##########
tests/gold_tests/pluginTest/header_rewrite/header_rewrite.test.py:
##########
@@ -27,25 +29,46 @@
 
 Test.testName = ""
 request_header = {"headers": "GET / HTTP/1.1\r\nHost: 
www.example.com\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
-# expected response from the origin server
 response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", 
"timestamp": "1469733493.993", "body": ""}
+server.addResponse("sessionfile.log", request_header, response_header)
 
-# add response to the server dictionary
+request_header = {"headers": "GET /503 HTTP/1.1\r\nHost: 
www.example.com\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
+response_header = {
+    "headers": "HTTP/1.1 503 Service Unavailable\r\nConnection: close\r\n\r\n",
+    "timestamp": "1469733493.993",
+    "body": ""
+}
 server.addResponse("sessionfile.log", request_header, response_header)
+
 ts.Disk.records_config.update(
     {
         'proxy.config.diags.debug.enabled': 1,
         'proxy.config.diags.show_location': 0,
-        'proxy.config.diags.debug.tags': 'header.*',
+        'proxy.config.diags.debug.tags': 'header|http',

Review Comment:
   The debug tags string contains 'header|http' but based on the existing 
pattern and other files, this should likely be 'header.*|http' to match the 
header rewrite plugin debug pattern.
   ```suggestion
           'proxy.config.diags.debug.tags': 'header.*|http',
   ```



##########
plugins/experimental/txn_box/plugin/src/ts_util.cc:
##########
@@ -660,7 +660,7 @@ ts::HttpHeader::field_remove(swoc::TextView name)
 bool
 ts::HttpResponse::status_set(TSHttpStatus status) const
 {
-  return TS_SUCCESS == TSHttpHdrStatusSet(_buff, _loc, status);
+  return TS_SUCCESS == TSHttpHdrStatusSet(_buff, _loc, status, nullptr, "");

Review Comment:
   [nitpick] The TSHttpHdrStatusSet call passes nullptr for txnp and an empty 
string for setter, which defeats the purpose of the status tracking feature. 
Consider passing the actual transaction handle and 'txn_box' as the setter name 
to enable proper tracking.
   ```suggestion
     return TS_SUCCESS == TSHttpHdrStatusSet(_buff, _loc, status, _txn, 
"txn_box");
   ```



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