Repository navigation
Conversation
|
This does not address the actual problem. The new check only prevents storing certain responses, while cache lookup still happens before the effective Cookie headers are available. Reproduced with real HTTP clients in both classic and async: a cached anonymous response with I think we need to reconsider the execution chain and ensure cache lookup and storage operate on the effective request headers, rather than adding another guard to the caching layer. |
@arturobernalg I will see if I can re-organize the execution pipeline without breaking everything. Please focus on other more pressing issues. |
|
@arturobernalg @Hsnmohd It turned out to be surprisingly painless. Please take a look at #959 |
CachingExec and AsyncCachingExec match Vary against the request they hold, which never carries the Cookie (or Authorization) header ProtocolExec adds from the context, so a
Cache-Control: max-age=60+Vary: Cookiepage fetched with one session is stored as the cookie-less variant and served to every other context (reproduced: bob's context got alice's page on the classic client, an anonymous one got bob's on async); the response is now not stored when the Vary-nominated headers actually sent (context.getRequest()) differ from those the cache saw, and the async exec passes a copy down the chain like the classic one.