Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
4.4.1
-
None
Description
If a BasicScheme with ChallengeState defined is put in a BasicAuthCache, it comes out of the cache with null challengeState.
This is a small test to demonstrate the problem:
@Test public void assertChallengeStateSurvivesSerialisation() throws Exception { BasicAuthCache localCache = new BasicAuthCache(); HttpHost aHost = new HttpHost("sample.host", 80); BasicScheme proxyScheme = new BasicScheme(); proxyScheme.processChallenge( new BasicHeader(HttpHeaders.PROXY_AUTHENTICATE, "Basic ")); assertThat(proxyScheme.getChallengeState(), is(ChallengeState.PROXY)); localCache.put(aHost, proxyScheme); BasicScheme outOfCache = (BasicScheme) localCache.get(aHost); assertThat(outOfCache.getChallengeState(), is(ChallengeState.PROXY)); }
result is:
java.lang.AssertionError: Expected: is <PROXY> but: was null
Attachments
Issue Links
- duplicates
-
HTTPCLIENT-1649 Caching of proxy auth schemes is broken
- Closed
- is related to
-
CXF-6704 Upgrade to httpclient 4.5.x
- Closed