Hsnmohd commented on PR #941:
URL: 
https://github.com/apache/httpcomponents-client/pull/941#issuecomment-6914129175

   @arturobernalg good catch. With preemptive auth the exchange stays 
`UNCHALLENGED`, so `isTargetAuthenticated` now also checks the request last 
sent to the backend (`context.getRequest()`, which the main exec sets after 
`ProtocolExec` has added `Authorization`). I kept the `SUCCESS` check for 
connection-based schemes, since they stop resending the header once the 
exchange succeeds. Both suites have a preemptive case now. On the previous 
revision those fail with `expected: <401> but was: <200>` for classic and 
async, and all four cases fail on master.
   
   @ok2c the tests are now in `caching/sync/TestCachingClientAuthentication` 
and `caching/async/TestCachingAsyncClientAuthentication`, built on 
`TestServerResources` / `TestAsyncServerResources` and 
`CachingHttpClientResource` / `CachingHttpAsyncClientResource`. The async suite 
uses the test server as a plain proxy, since that's the route where the cache 
never sees the header. I rebased on master to pick up 
`TestAsyncServerResources`.
   


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