sourcelevel / faraday-http-cache

A Faraday middleware that respects HTTP cache
Other
343 stars 86 forks source link

[ByVary] Use unique and sorted headers from the Vary header #132

Closed skryukov closed 2 years ago

skryukov commented 2 years ago

We should remove duplicates and sort headers from the Vary header before creating a key for a hash to make it more consistent (server might reorder headers, or send duplicates).

PS. the fix proposed by jrochkind at reddit: https://www.reddit.com/r/ruby/comments/w2z9th/comment/iguofqn/?utm_source=share&utm_medium=web2x&context=3