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
source share