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


##########
plugins/header_rewrite/resources.cc:
##########
@@ -70,7 +70,7 @@ Resources::gather(const ResourceIDs ids, TSHttpHookID hook)
     // Read request headers to server
     if (ids & RSRC_SERVER_REQUEST_HEADERS) {
       Dbg(pi_dbg_ctl, "\tAdding TXN server request header buffers");
-      if (!TSHttpTxnServerReqGet(state.txnp, &bufp, &hdr_loc)) {
+      if (TSHttpTxnServerReqGet(state.txnp, &bufp, &hdr_loc) != TS_SUCCESS) {

Review Comment:
   Good fix! The previous negation logic was incorrect since `TS_SUCCESS` 
equals 0, making `!TSHttpTxnServerReqGet(...)` true on success and causing the 
error branch to execute when the function succeeded.



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