Class ResponseProtocolCompliance

java.lang.Object
org.apache.hc.client5.http.impl.cache.ResponseProtocolCompliance

class ResponseProtocolCompliance extends Object
  • Field Details

  • 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 original HttpRequest
      request - The HttpRequest that generated an origin hit and response
      response - The HttpResponse 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)