Class HttpChunkLineValidatingByteProcessor
java.lang.Object
io.netty.handler.codec.http.HttpChunkLineValidatingByteProcessor
- All Implemented Interfaces:
ByteProcessor
Validates the chunk start line. That is, the chunk size and chunk extensions, until the CR LF pair.
See RFC 9112 section 7.1.
chunked-body = *chunk
last-chunk
trailer-section
CRLF
chunk = chunk-size [ chunk-ext ] CRLF
chunk-data CRLF
chunk-size = 1*HEXDIG
last-chunk = 1*("0") [ chunk-ext ] CRLF
chunk-data = 1*OCTET ; a sequence of chunk-size octets
chunk-ext = *( BWS ";" BWS chunk-ext-name
[ BWS "=" BWS chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token / quoted-string
quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
obs-text = %x80-FF
OWS = *( SP / HTAB )
; optional whitespace
BWS = OWS
; "bad" whitespace
VCHAR = %x21-7E
; visible (printing) characters
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classprivate static enumNested classes/interfaces inherited from interface ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final HttpChunkLineValidatingByteProcessor.State[]Fields inherited from interface ByteProcessor
FIND_ASCII_SPACE, FIND_COMMA, FIND_CR, FIND_CRLF, FIND_LF, FIND_LINEAR_WHITESPACE, FIND_NON_CR, FIND_NON_CRLF, FIND_NON_LF, FIND_NON_LINEAR_WHITESPACE, FIND_NON_NUL, FIND_NUL, FIND_SEMI_COLON -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SIZE
private static final int SIZE- See Also:
-
CHUNK_EXT_NAME
private static final int CHUNK_EXT_NAME- See Also:
-
CHUNK_EXT_VAL_START
private static final int CHUNK_EXT_VAL_START- See Also:
-
CHUNK_EXT_VAL_QUOTED
private static final int CHUNK_EXT_VAL_QUOTED- See Also:
-
CHUNK_EXT_VAL_QUOTED_ESCAPE
private static final int CHUNK_EXT_VAL_QUOTED_ESCAPE- See Also:
-
CHUNK_EXT_VAL_QUOTED_END
private static final int CHUNK_EXT_VAL_QUOTED_END- See Also:
-
CHUNK_EXT_VAL_TOKEN
private static final int CHUNK_EXT_VAL_TOKEN- See Also:
-
STATES_BY_ORDINAL
-
state
-
-
Constructor Details
-
HttpChunkLineValidatingByteProcessor
HttpChunkLineValidatingByteProcessor()
-
-
Method Details
-
process
public boolean process(byte value) - Specified by:
processin interfaceByteProcessor- Returns:
trueif the processor wants to continue the loop and handle the next byte in the buffer.falseif the processor wants to stop handling bytes and abort the loop.
-
finish
public void finish()
-