Class ResponseProtocolCompliance
- java.lang.Object
-
- org.apache.hc.client5.http.impl.cache.ResponseProtocolCompliance
-
class ResponseProtocolCompliance extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringUNEXPECTED_100_CONTINUEprivate static java.lang.StringUNEXPECTED_PARTIAL_CONTENT
-
Constructor Summary
Constructors Constructor Description ResponseProtocolCompliance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidensure200ForOPTIONSRequestWithNoBodyHasContentLengthZero(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response)private voidensure206ContainsDateHeader(org.apache.hc.core5.http.HttpResponse response)private voidensure304DoesNotContainExtraEntityHeaders(org.apache.hc.core5.http.HttpResponse response)private voidensurePartialContentIsNotSentToAClientThatDidNotRequestIt(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response)voidensureProtocolCompliance(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response)When we get a response from a down stream server (Origin Server) we attempt to see if it is HTTP 1.1 Compliant and if not, attempt to make it so.private voididentityIsNotUsedInContentEncoding(org.apache.hc.core5.http.HttpResponse response)private voidremoveResponseTransferEncoding(org.apache.hc.core5.http.HttpResponse response)private voidrequestDidNotExpect100ContinueButResponseIsOne(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response)private voidtransferEncodingIsNotReturnedTo1_0Client(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response)private voidwarningsWithNonMatchingWarnDatesAreRemoved(org.apache.hc.core5.http.HttpResponse response)
-
-
-
Field Detail
-
UNEXPECTED_100_CONTINUE
private static final java.lang.String UNEXPECTED_100_CONTINUE
- See Also:
- Constant Field Values
-
UNEXPECTED_PARTIAL_CONTENT
private static final java.lang.String UNEXPECTED_PARTIAL_CONTENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
ensureProtocolCompliance
public void ensureProtocolCompliance(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response) throws java.io.IOExceptionWhen we get a response from a down stream server (Origin Server) we attempt to see if it is HTTP 1.1 Compliant and if not, attempt to make it so.- Parameters:
originalRequest- The originalHttpRequestrequest- TheHttpRequestthat generated an origin hit and responseresponse- TheHttpResponsefrom the origin server- Throws:
java.io.IOException- Bad things happened
-
warningsWithNonMatchingWarnDatesAreRemoved
private void warningsWithNonMatchingWarnDatesAreRemoved(org.apache.hc.core5.http.HttpResponse response)
-
identityIsNotUsedInContentEncoding
private void identityIsNotUsedInContentEncoding(org.apache.hc.core5.http.HttpResponse response)
-
ensure206ContainsDateHeader
private void ensure206ContainsDateHeader(org.apache.hc.core5.http.HttpResponse response)
-
ensurePartialContentIsNotSentToAClientThatDidNotRequestIt
private void ensurePartialContentIsNotSentToAClientThatDidNotRequestIt(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
ensure200ForOPTIONSRequestWithNoBodyHasContentLengthZero
private void ensure200ForOPTIONSRequestWithNoBodyHasContentLengthZero(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response)
-
ensure304DoesNotContainExtraEntityHeaders
private void ensure304DoesNotContainExtraEntityHeaders(org.apache.hc.core5.http.HttpResponse response)
-
requestDidNotExpect100ContinueButResponseIsOne
private void requestDidNotExpect100ContinueButResponseIsOne(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
transferEncodingIsNotReturnedTo1_0Client
private void transferEncodingIsNotReturnedTo1_0Client(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response)
-
removeResponseTransferEncoding
private void removeResponseTransferEncoding(org.apache.hc.core5.http.HttpResponse response)
-
-