masaori335 commented on a change in pull request #6747:
URL: https://github.com/apache/trafficserver/pull/6747#discussion_r422713113
##########
File path: proxy/http2/HPACK.cc
##########
@@ -430,7 +438,13 @@ HpackDynamicTable::_evict_overflowed_entries()
(*h)->value_get(&value_len);
this->_current_size -= ADDITIONAL_OCTETS + name_len + value_len;
- this->_mhdr->field_delete(*h, false);
+
+ if (this->_mhdr_old && this->_mhdr_old->fields_count() != 0) {
+ this->_mhdr_old->field_delete(*h, false);
+ } else {
+ this->_mhdr->field_delete(*h, false);
+ }
+
Review comment:
Dynamic Table is FIFO, so when we have both `_mhdr` & `_mhdr_old`, we
add a new entry to the `_mhdr` and remove from the `_mhdr_old` (until the
`_mhdr_old` becomes empty).
In other words, all MIMEFields in the `_mhdr_old` is older than any
MIMEField in the `_mhdr`. Thus we need to delete MIMEFileds in the `_mhdr_old`
first.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]