sometimes a http transfer uses several packets. So I must know when the last
packet is received to start answering. So far I search 'Content-Length' in
the 1st packet and subtract the length of each packet. This causes problems
if the string is not in the 1st packet, or the transmission is terminated
from the remote side.
Those are only some of the problems this can cause. It is perfectly
legal for the web server to send data 1-byte-per-packet. You have to
be prepared for that if you want to be a well-behaved network node.