Class ResponseProtocolCompliance
java.lang.Object
org.apache.hc.client5.http.impl.cache.ResponseProtocolCompliance
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate 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 Details
-
UNEXPECTED_100_CONTINUE
- See Also:
-
UNEXPECTED_PARTIAL_CONTENT
- See Also:
-
-
Constructor Details
-
ResponseProtocolCompliance
ResponseProtocolCompliance()
-
-
Method Details
-
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 IOException 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.- Parameters:
originalRequest- The originalHttpRequestrequest- TheHttpRequestthat generated an origin hit and responseresponse- TheHttpResponsefrom the origin server- Throws:
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 IOException - Throws:
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 IOException - Throws:
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)
-