Interface ContentLengthStrategy

    • Field Detail

      • UNDEFINED

        static final long UNDEFINED
        Message body not explicitly delineated. Legal for HTTP response messages and illegal for HTTP request messages.
        See Also:
        Constant Field Values
    • Method Detail

      • determineLength

        long determineLength​(HttpMessage message)
                      throws HttpException
        Returns length of the given message in bytes. The returned value must be a non-negative number, CHUNKED if the message is chunk coded, or UNDEFINED if the message is not explicitly delineated.
        Parameters:
        message - HTTP message
        Returns:
        content length, UNDEFINED, or CHUNKED
        Throws:
        HttpException - in case of HTTP protocol violation