Class ResponseContent

  • All Implemented Interfaces:
    HttpResponseInterceptor

    @Contract(threading=IMMUTABLE)
    public class ResponseContent
    extends Object
    implements HttpResponseInterceptor
    ResponseContent is the most important interceptor for outgoing responses. It is responsible for delimiting content length by adding Content-Length or Transfer-Content headers based on the properties of the enclosed entity and the protocol version. This interceptor is required for correct functioning of server side protocol processors.
    Since:
    4.0
    • Constructor Detail

      • ResponseContent

        public ResponseContent()
        Default constructor. The Content-Length or Transfer-Encoding will cause the interceptor to throw ProtocolException if already present in the response message.
      • ResponseContent

        public ResponseContent​(boolean overwrite)
        Constructor that can be used to fine-tune behavior of this interceptor.
        Parameters:
        overwrite - If set to true the Content-Length and Transfer-Encoding headers will be created or updated if already present. If set to false the Content-Length and Transfer-Encoding headers will cause the interceptor to throw ProtocolException if already present in the response message.
        Since:
        4.2