Class ResponseProtocolCompliance
java.lang.Object
org.apache.hc.client5.http.impl.cache.ResponseProtocolCompliance
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
ensure200ForOPTIONSRequestWithNoBodyHasContentLengthZero
(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response) private void
ensure206ContainsDateHeader
(org.apache.hc.core5.http.HttpResponse response) private void
ensure304DoesNotContainExtraEntityHeaders
(org.apache.hc.core5.http.HttpResponse response) private void
ensurePartialContentIsNotSentToAClientThatDidNotRequestIt
(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response) void
ensureProtocolCompliance
(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 void
identityIsNotUsedInContentEncoding
(org.apache.hc.core5.http.HttpResponse response) private void
removeResponseTransferEncoding
(org.apache.hc.core5.http.HttpResponse response) private void
requestDidNotExpect100ContinueButResponseIsOne
(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response) private void
transferEncodingIsNotReturnedTo1_0Client
(org.apache.hc.core5.http.HttpRequest originalRequest, org.apache.hc.core5.http.HttpResponse response) private void
warningsWithNonMatchingWarnDatesAreRemoved
(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 originalHttpRequest
request
- TheHttpRequest
that generated an origin hit and responseresponse
- TheHttpResponse
from 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)
-