public class StrictContentLengthStrategy extends Object implements ContentLengthStrategy
ProtocolException
if it encounters an unsupported
transfer encoding or a malformed Content-Length
header
value.
This class recognizes "chunked" and "identitiy" transfer-coding only.
CHUNKED, IDENTITY
Constructor and Description |
---|
StrictContentLengthStrategy() |
public long determineLength(HttpMessage message) throws HttpException
ContentLengthStrategy
ContentLengthStrategy.IDENTITY
if the end of the
message will be delimited by the end of connection, or ContentLengthStrategy.CHUNKED
if the message is chunk codeddetermineLength
in interface ContentLengthStrategy
ContentLengthStrategy.IDENTITY
, or ContentLengthStrategy.CHUNKED
HttpException
- in case of HTTP protocol violationCopyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.