Renamed cache protocol conformance response interceptor (no functional changes)

This commit is contained in:
Oleg Kalnichevski 2023-10-03 15:52:00 +02:00
parent 77fdc11818
commit 152ba4736f
5 changed files with 8 additions and 8 deletions

View File

@ -65,7 +65,7 @@ public class CachingH2AsyncClientBuilder extends H2AsyncClientBuilder {
protected CachingH2AsyncClientBuilder() {
super();
addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE);
addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE);
addResponseInterceptorLast(ResponseViaCache.INSTANCE);
addRequestInterceptorLast(RequestViaCache.INSTANCE);
this.deleteCache = true;

View File

@ -65,7 +65,7 @@ public class CachingHttpAsyncClientBuilder extends HttpAsyncClientBuilder {
protected CachingHttpAsyncClientBuilder() {
super();
addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE);
addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE);
addResponseInterceptorLast(ResponseViaCache.INSTANCE);
addRequestInterceptorLast(RequestViaCache.INSTANCE);
this.deleteCache = true;

View File

@ -61,7 +61,7 @@ public class CachingHttpClientBuilder extends HttpClientBuilder {
protected CachingHttpClientBuilder() {
super();
addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE);
addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE);
addResponseInterceptorLast(ResponseViaCache.INSTANCE);
addRequestInterceptorLast(RequestViaCache.INSTANCE);
this.deleteCache = true;

View File

@ -48,9 +48,9 @@ import org.apache.hc.core5.http.protocol.HttpContext;
* header if it is not present in the response message..
*/
@Contract(threading = ThreadingBehavior.IMMUTABLE)
class ResponseProtocolCompliance implements HttpResponseInterceptor {
class ResponseCacheConformance implements HttpResponseInterceptor {
public static final ResponseProtocolCompliance INSTANCE = new ResponseProtocolCompliance();
public static final ResponseCacheConformance INSTANCE = new ResponseCacheConformance();
private final static String[] DISALLOWED_ENTITY_HEADERS = {
HttpHeaders.CONTENT_ENCODING,

View File

@ -37,13 +37,13 @@ import org.apache.hc.core5.http.support.BasicResponseBuilder;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class TestResponseProtocolCompliance {
public class TestResponseCacheConformance {
private ResponseProtocolCompliance impl;
private ResponseCacheConformance impl;
@BeforeEach
public void setUp() {
impl = ResponseProtocolCompliance.INSTANCE;
impl = ResponseCacheConformance.INSTANCE;
}
private void shouldStripEntityHeaderFromOrigin304ResponseToStrongValidation(