On Thu, 2013-09-19 at 17:38 +0200, Jacek Caban wrote:
I was hoping for a test like the attached one, which shows that there is still more work to do. But it's a step in the right direction, so I'm fine with your patch.
The issue here is that HTTP_ReceiveRequestData calls refill_read_buffer, which calls generic read_http_stream with a read size of 8192 (the read buffer is still empty). In non-chunked mode this should read the minimum of that size and the content length. In chunked mode we don't know the content length, and we should read the minimum of chunk size and read buffer size, as shown by your test.
Maybe we should add a refill_read_buffer method to the backends and call that instead of read_http_stream?