| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| protected InputBuffer | buffer
Next buffer in the pipeline. |
| protected static final ByteChunk | |
| protected static final String | |
| protected boolean | endChunk
Flag set to true when the end chunk has been read. |
| private boolean | error
Flag that indicates if an error has occurred. |
| private long | extensionSize
Size of extensions processed for this request. |
| private final long | maxExtensionSize
Limit for extension size. |
| private final int | |
| private final int | maxTrailerSize
Limit for trailer size. |
| protected boolean | needCRLFParse
Flag set to true if the next call to doRead() must parse a CRLF pair before doing anything else. |
| protected ByteBuffer | readChunk
Byte chunk used to read bytes. |
| protected int | remaining
Number of bytes remaining in the current chunk. |
| private Request | request
Request being parsed. |
| private static final StringManager | |
| protected final ByteChunk | trailingHeaders
Byte chunk used to store trailing headers. |
| Access | Constructor and Description |
|---|---|
| public | ChunkedInputFilter(int maxTrailerSize, Set<String> allowedTrailerHeaders, int maxExtensionSize, int maxSwallowSize)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Implements org. Amount of bytes still available in a buffer. |
| private void | |
| public int | doRead(ApplicationBufferHandler
ApplicationBufferHandler that provides the buffer to read data into. handler)Implements org. Read from the input stream into the ByteBuffer provided by the ApplicationBufferHandler. |
| public long | |
| public void | |
| public ByteBuffer | |
| public ByteChunk | getEncodingName()
Implements org. Return the name of the associated encoding; Here, the value is "identity". |
| public boolean | isFinished()
Implements org. Has the request body been read fully? |
| protected boolean | Returns: true if the chunk header has been
successfully parsedParse the header of a chunk. |
| protected void | parseCRLF(boolean
Should tolerant parsing (LF and CRLF) be used? This
is recommended (RFC2616, section 19.3) for message
headers. tolerant)Parse CRLF at end of chunk. |
| protected void | |
| private boolean | |
| protected int | |
| public void | recycle()
Implements org. Make the filter ready to process the next request. |
| public void | setBuffer(InputBuffer
The next buffer buffer)Implements org. Set the next buffer in the filter pipeline. |
| public void | |
| public void | setRequest(Request
The request to be associated with this filter request)Implements org. Read the content length from the request. |
| private void | |
| private void |
| allowedTrailerHeaders | back to summary |
|---|---|
| private final Set<String> allowedTrailerHeaders | |
| buffer | back to summary |
|---|---|
| protected InputBuffer buffer Next buffer in the pipeline. | |
| ENCODING | back to summary |
|---|---|
| protected static final ByteChunk ENCODING | |
| ENCODING_NAME | back to summary |
|---|---|
| protected static final String ENCODING_NAME | |
| endChunk | back to summary |
|---|---|
| protected boolean endChunk Flag set to true when the end chunk has been read. | |
| error | back to summary |
|---|---|
| private boolean error Flag that indicates if an error has occurred. | |
| extensionSize | back to summary |
|---|---|
| private long extensionSize Size of extensions processed for this request. | |
| maxExtensionSize | back to summary |
|---|---|
| private final long maxExtensionSize Limit for extension size. | |
| maxSwallowSize | back to summary |
|---|---|
| private final int maxSwallowSize | |
| maxTrailerSize | back to summary |
|---|---|
| private final int maxTrailerSize Limit for trailer size. | |
| needCRLFParse | back to summary |
|---|---|
| protected boolean needCRLFParse Flag set to true if the next call to doRead() must parse a CRLF pair before doing anything else. | |
| readChunk | back to summary |
|---|---|
| protected ByteBuffer readChunk Byte chunk used to read bytes. | |
| remaining | back to summary |
|---|---|
| protected int remaining Number of bytes remaining in the current chunk. | |
| request | back to summary |
|---|---|
| private Request request Request being parsed. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| trailingHeaders | back to summary |
|---|---|
| protected final ByteChunk trailingHeaders Byte chunk used to store trailing headers. | |
| ChunkedInputFilter | back to summary |
|---|---|
| public ChunkedInputFilter(int maxTrailerSize, Set<String> allowedTrailerHeaders, int maxExtensionSize, int maxSwallowSize) | |
| available | back to summary |
|---|---|
| public int available() Implements org. Amount of bytes still available in a buffer.
| |
| checkError | back to summary |
|---|---|
| private void checkError() throws IOException | |
| doRead | back to summary |
|---|---|
| public int doRead(ApplicationBufferHandler handler) throws IOException Implements org. Doc from org. Read from the input stream into the ByteBuffer provided by the ApplicationBufferHandler. Important Note the current model assumes that the protocol will 'own' the ByteBuffer and return a pointer to it.
| |
| end | back to summary |
|---|---|
| public long end() throws IOException Implements org. End the current request.
| |
| expand | back to summary |
|---|---|
| public void expand(int size) Implements org.
| |
| getByteBuffer | back to summary |
|---|---|
| public ByteBuffer getByteBuffer() Implements org.
| |
| getEncodingName | back to summary |
|---|---|
| public ByteChunk getEncodingName() Implements org. Return the name of the associated encoding; Here, the value is "identity".
| |
| isFinished | back to summary |
|---|---|
| public boolean isFinished() Implements org. Doc from org. Has the request body been read fully?
| |
| parseChunkHeader | back to summary |
|---|---|
| protected boolean parseChunkHeader() throws IOException Parse the header of a chunk.
A chunk header can look like one of the following: The letters before CRLF or ';' (whatever comes first) must be valid hex digits. We should not parse F23IAMGONNAMESSTHISUP34CRLF as a valid header according to the spec.
| |
| parseCRLF | back to summary |
|---|---|
| protected void parseCRLF(boolean tolerant) throws IOException Parse CRLF at end of chunk.
| |
| parseEndChunk | back to summary |
|---|---|
| protected void parseEndChunk() throws IOException Parse end chunk data.
| |
| parseHeader | back to summary |
|---|---|
| private boolean parseHeader() throws IOException | |
| readBytes | back to summary |
|---|---|
| protected int readBytes() throws IOException Read bytes from the previous buffer.
| |
| recycle | back to summary |
|---|---|
| public void recycle() Implements org. Make the filter ready to process the next request.
| |
| setBuffer | back to summary |
|---|---|
| public void setBuffer(InputBuffer buffer) Implements org. Set the next buffer in the filter pipeline.
| |
| setByteBuffer | back to summary |
|---|---|
| public void setByteBuffer(ByteBuffer buffer) Implements org.
| |
| setRequest | back to summary |
|---|---|
| public void setRequest(Request request) Implements org. Read the content length from the request.
| |
| throwBadRequestException | back to summary |
|---|---|
| private void throwBadRequestException(String msg) throws IOException | |
| throwEOFException | back to summary |
|---|---|
| private void throwEOFException(String msg) throws IOException | |