public class LenientHttpResponseParser extends DefaultHttpResponseParser
Constructor and Description |
---|
LenientHttpResponseParser(Http1Config h1Config)
Creates new instance of DefaultHttpResponseParser.
|
LenientHttpResponseParser(LineParser lineParser,
HttpResponseFactory<ClassicHttpResponse> responseFactory,
Http1Config h1Config)
Creates new instance of DefaultHttpResponseParser.
|
Modifier and Type | Method and Description |
---|---|
protected ClassicHttpResponse |
createMessage(CharArrayBuffer buffer)
Subclasses must override this method to generate an instance of
HttpMessage based on the initial input from the session buffer. |
createConnectionClosedException
parse, parseHeaders, parseHeaders
public LenientHttpResponseParser(Http1Config h1Config)
h1Config
- HTTP/1.1 parameters. If null
. Http1Config.DEFAULT
will be used.public LenientHttpResponseParser(LineParser lineParser, HttpResponseFactory<ClassicHttpResponse> responseFactory, Http1Config h1Config)
lineParser
- the line parser. If null
BasicLineParser.INSTANCE
will be used.responseFactory
- HTTP response factory. If null
DefaultClassicHttpResponseFactory.INSTANCE
will be used.h1Config
- HTTP/1.1 parameters. If null
. Http1Config.DEFAULT
will be used.protected ClassicHttpResponse createMessage(CharArrayBuffer buffer) throws IOException
AbstractMessageParser
HttpMessage
based on the initial input from the session buffer.
Usually this method is expected to read just the very first line or
the very first valid from the data stream and based on the input generate
an appropriate instance of HttpMessage
.
createMessage
in class DefaultHttpResponseParser
buffer
- the session input buffer.IOException
- in case of an I/O error.