arturobernalg opened a new pull request, #960:
URL: https://github.com/apache/httpcomponents-client/pull/960

   CachingExec/AsyncCachingExec match Vary and build the cache key against the 
request as it looks above the execution chain. Cookie is added lower, by 
RequestAddCookies in 
MainClientExec/HttpAsyncMainClientExec/H2AsyncMainClientExec, and Authorization 
by ProtocolExec/AsyncProtocolExec, also below the cache. A response with Vary: 
Cookie or Vary: Authorization, fetched by one user, was stored and served to a 
different user whose actual request differs - RFC 9111 4.1.
   
   No reorder, nothing changes on the wire. Storage uses the request actually 
sent (context.getRequest(), as isTargetAuthenticated already does). Lookup 
previews what the first attempt would send - RequestAddCookies against a 
scratch context for Cookie, the same pre-challenge steps ProtocolExec runs for 
Authorization - and that preview is authoritative, including when the first 
match already looked like a hit. The preview is skipped whenever the auth 
exchange has a pending option queue, so it can never touch a Digest nonce or 
advance an NTLM handshake.
   
   Also fixes the variant key lowercasing/embedding Authorization raw (two 
credentials differing only in case collided into one key) by hashing it 
instead, same shape as the existing User-Agent special case.
   
   Scope is Cookie and Authorization only. Everything else behaves as before.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to