arturobernalg commented on PR #959:
URL:
https://github.com/apache/httpcomponents-client/pull/959#issuecomment-7078316418
I think this reorder breaks more than it fixes. Moving CACHING below
PROTOCOL also moves it below where absolute-form gets set for proxied requests,
where the entity gets wrapped for keep-alive, and where the auth retry loop
runs. As it
stands:
- Proxy requests break: the cache's copy of the request drops the
absolute-form flag ProtocolExec set, so a real proxy (tested against Squid)
sees GET /stuff instead of GET http://host/stuff and returns 400.
- Keep-alive breaks on the classic client: the cache now closes the
backend response instead of handing it to ResponseEntityProxy, so every
cacheable GET opens a new connection instead of reusing one. The stale-if-error
path leaks a
connection the same way.
- A 401 with freshness headers gets cached and served back inside the auth
challenge/retry loop, instead of letting the authenticated retry through.
- On the async side, once the connection-based auth exchange's endpoint is
released, AsyncProtocolExec sees it as unauthenticated and the cache serves
that response to a different, anonymous context — this reopens what b202e125f
fixed
for NTLM/SPNEGO/Kerberos.
The Vary: Authorization fix itself is real and worth keeping, but we'd be
trading one correctness bug for four others.
--
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]