Closed jasnell closed 3 years ago
Thanks.
I agree re: stating that trailer-update
does not mandate a trailer; will refine it along those lines.
WRT the time delta - good point. HTTP is a bit fuzzy about this, effectively treating the entire response as atomic. I feel like a reasonable default is that if the trailer updates cache-control, the time the response is received should be considered to be that point, because that's closest to when the policy was actually generated.
I feel like a reasonable default is that if the trailer updates cache-control, the time the response is received should be considered to be that point, because that's closest to when the policy was actually generated.
Agreed.
Looking at age calcluation, it's a little more subtle than that. I think we need to say that for the purposes of calculating resident_time
, response_time
should be considered to be the time the trailer was received; however, for the purposes of calculating response_delay
for corrected_age_value
, that would be counter-productive.
Hmm yeah... That's what had me thinking, thank you for looking that up. I think the likely safest thing to do is to simply say that the trailing Cache-Control has no impact on the age calculation, and that even with an updated Cache-Control, the age is calculated the same as it would be without the trailer. It's the only way we're going to be able to make it consistent with non-implementing endpoints and keep things simple.
Just a couple copy edits, otherwise it looks good with a comment...
In the good case, where
trailer-update
is indicated in the headerCache-Control
but no subsequent trailingCache-Control
is provided:It says that "Caches that do not implement this specification will cache it by the header policy; caches that do implement will see no updates in the trailer and do the same.", but that means that the
trailer-update
directive does get stored and forwarded on by the cache (since it is never removed). I'm just wanting to make sure there's no unintended down stream consequence from that. We may want to explicitly state that the presence of atrailer-update
directive does not mandate that aCache-Control
trailer is present.The only other thing that I can think of is ... when a trailing
Cache-Control
directive is received and it contains an updated timestamp (max-stale, expires, etc) ... is there any impact on the origin time from which that is calculated. Let's take an extreme example: I start streaming a resource back from the server with a max-age of 30 seconds. 20 seconds later the resource is done streaming and I update theCache-Control
with a max-age of 10 seconds.... Is the resource already stale (age calculated from the time the resource started to be received) or is the age calculated from the time theCache-Control
was updated and the resource was committed to the cache? Or does that not even matter here.