Open caobug opened 1 year ago
The unexpected ones look correct to me. Those are partial ends.
The top example looks wrong, though. It should be complete, and report that the end is at byte 5, no?
No. The function parse_chunk_size
reads \r, then \n, then breaks and returns Complete
.
Therefore correct
only reads 3 bytes. The unexpected
below will always read only the first 3 bytes.
Hello, the end of the chunk should be ended by two sets of
\r\n
. butparse_chunk_size
considers that one set is enough, which results in the inability to know the completion of message transmission in the TCP stream.for example:
correct:
unexp: