What is the maximum block size in an encrypted HTTP response?

w3.org (RFC2616) does not seem to determine the maximum size for pieces. But without the maximum block size, there is no room for expanding the piece. There must be a maximum block size, otherwise I cannot ignore the block extension, as I advise if I do not understand it (Quote: "MUST ignore chunk-extension extensions they do not understand" ).

+6
source share
2 answers

Each chunk extension should begin with a semi-colony, and the list of chunk extensions should end with a CRLF. When parsing fragment size, stop at either a semicolon or CRLF. If you stopped at a semicolon, ignore everything until the next CRLF. There is no need for a maximum block size.

 chunk = chunk-size [ chunk-extension ] CRLF chunk-data CRLF chunk-size = 1*HEX chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) 
+8
source

The HTTP specification is pretty clear regarding the syntax of HTTP messages.

The block size is always indicated as a hexadecimal number. If instead of this number CRLF does not follow, but instead ; , you know there is an extension. This extension is identified by its name ( chunk-ext-name ). If you have never heard of this particular name, you MUST ignore it.

So what exactly is your problem?

  • Read hexadecimal number
  • Ignore everything until the next CRLF
  • be happy
+4
source

Source: https://habr.com/ru/post/895026/


All Articles