François Magnan wrote:
What could lead to this huge difference between a sequence of read-u8 and read-line on WinXP???
Just an idea (I don't run windows and am too tired to study the code in detail): you might be miscalculating the reply length, compared to what's actually being sent, since possibly you/the runtime might be decoding/encoding utf8 twice or something, and then the individual requests might only be "finished" when some part timeouts (the browser might be closing the connection after some timeout). I'd check what goes over the wire (and when) with some tool that can do that (something like GNU/Linux' strace or tcpdump).