bneradt commented on code in PR #12679:
URL: https://github.com/apache/trafficserver/pull/12679#discussion_r2783828088
##########
src/proxy/hdrs/MIME.cc:
##########
@@ -3725,13 +3726,26 @@ MIMEHdrImpl::recompute_cooked_stuff(MIMEField
*changing_field_or_null)
mime_hdr_cooked_stuff_init(this, changing_field_or_null);
- //////////////////////////////////////////////////
- // (1) cook the Cache-Control header if present //
- //////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////////////////
+ // (1) cook the Cache-Control header (or targeted variant) if present //
+ /////////////////////////////////////////////////////////////////////////////
// to be safe, recompute unless you know this call is for other cooked field
if ((changing_field_or_null == nullptr) ||
(changing_field_or_null->m_wks_idx != MIME_WKSIDX_PRAGMA)) {
- field = mime_hdr_field_find(this,
static_cast<std::string_view>(MIME_FIELD_CACHE_CONTROL));
+ field = nullptr;
+
+ // Check for targeted cache control headers first (in priority order).
Review Comment:
assert that targeted_headers is non-nullptr.
--
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]