HTTPCLIENT-1470 CachingExec(ClientExecChain, HttpCache, CacheConfig, AsynchronousValidator) throws NPE if config is null
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1570963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
50b27ac790
commit
67a1cc7199
|
@ -4,6 +4,8 @@ Changes for 4.4-alpha1
|
|||
Changelog:
|
||||
-------------------
|
||||
|
||||
* [HTTPCLIENT-1470] CachingExec(ClientExecChain, HttpCache, CacheConfig, AsynchronousValidator) throws NPE if config is null
|
||||
|
||||
* [HTTPCLIENT-1466] FileBodyPart#generateContentType() ignores custom ContentType values.
|
||||
Contributed by Oleg Kalnichevski <olegk at apache.org>
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ public class CachingExec implements ClientExecChain {
|
|||
this.validityPolicy = new CacheValidityPolicy();
|
||||
this.responseGenerator = new CachedHttpResponseGenerator(this.validityPolicy);
|
||||
this.cacheableRequestPolicy = new CacheableRequestPolicy();
|
||||
this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy, config);
|
||||
this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy, this.cacheConfig);
|
||||
this.conditionalRequestBuilder = new ConditionalRequestBuilder();
|
||||
this.responseCompliance = new ResponseProtocolCompliance();
|
||||
this.requestCompliance = new RequestProtocolCompliance(config.isWeakETagOnPutDeleteAllowed());
|
||||
this.requestCompliance = new RequestProtocolCompliance(this.cacheConfig.isWeakETagOnPutDeleteAllowed());
|
||||
this.responseCachingPolicy = new ResponseCachingPolicy(
|
||||
this.cacheConfig.getMaxObjectSize(), this.cacheConfig.isSharedCache(),
|
||||
this.cacheConfig.isNeverCacheHTTP10ResponsesWithQuery(), this.cacheConfig.is303CachingEnabled());
|
||||
|
|
|
@ -366,6 +366,11 @@ public class TestRFC5861Compliance extends AbstractProtocolTest {
|
|||
assertTrue(warning110Found);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHTTPCLIENT1470() {
|
||||
impl = new CachingExec(mockBackend, cache, null, new AsynchronousValidator(config));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStaleWhileRevalidateReturnsStaleNonRevalidatableEntryWithWarning()
|
||||
throws Exception {
|
||||
|
|
Loading…
Reference in New Issue