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


##########
plugins/slice/HttpHeader.cc:
##########
@@ -155,10 +155,13 @@ HttpHeader::removeKey(char const *const keystr, int const 
keylen)
 
   bool status = true;
 
-  TSMLoc const locfield = TSMimeHdrFieldFind(m_buffer, m_lochdr, keystr, 
keylen);
-  if (nullptr != locfield) {
-    int const rcode = TSMimeHdrFieldRemove(m_buffer, m_lochdr, locfield);
-    status          = (TS_SUCCESS == rcode);
+  while (status) {
+    TSMLoc const locfield = TSMimeHdrFieldFind(m_buffer, m_lochdr, keystr, 
keylen);
+    if (nullptr == locfield) {
+      break;
+    }
+
+    status = (TS_SUCCESS == TSMimeHdrFieldRemove(m_buffer, m_lochdr, 
locfield));
     TSHandleMLocRelease(m_buffer, m_lochdr, locfield);
   }

Review Comment:
   highly unlikely but will adjust.



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