Closed tanguilp closed 2 years ago
Yes.
A patch for this would be welcome, assuming there is real world use cases. A quick look shows support for this was added a couple years ago in some browsers.
The use-case is that I'm working on an HTTP cache library :)
This would make my life easier, but I can do without it.
(BTW thanks for the great work on these libs!)
A quick look shows support for this was added a couple years ago in some browsers.
Also note that:
Closing in favor of the PR.
rfc5861 defines the following headers:
stale-while-revalidate
stale-if-error
Currently
cow_http_hd:parse_cache_control/1
returns a binary for their value. Their delta values could be parsed likemax-age
,max-stale
,min-fresh
ands-maxage
(here: https://github.com/ninenines/cowlib/blob/6deddc7d3360aa0f50eb2375cc0226157185c472/src/cow_http_hd.erl#L1170) and returned as integers as well.