Class HttpChunkLineValidatingByteProcessor

java.lang.Object
io.netty.handler.codec.http.HttpChunkLineValidatingByteProcessor
All Implemented Interfaces:
ByteProcessor

final class HttpChunkLineValidatingByteProcessor extends Object implements 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
 
  • Field Details

  • Constructor Details

    • HttpChunkLineValidatingByteProcessor

      HttpChunkLineValidatingByteProcessor()
  • Method Details

    • process

      public boolean process(byte value)
      Specified by:
      process in interface ByteProcessor
      Returns:
      true if the processor wants to continue the loop and handle the next byte in the buffer. false if the processor wants to stop handling bytes and abort the loop.
    • finish

      public void finish()