On 9/11/13 7:09 PM, Hans Leidekker wrote:
On Wed, 2013-09-11 at 17:53 +0200, Jacek Caban wrote:
Network traces tell me that native also performs a read on the first call to InternetQueryDataAvailable.
Are you sure it's not an asynchronous read from a separated thread that is ordered by InternetQueryDataAvailable if no data is available?
This was a synchronous request.
For synchronous request, if get_avail_data returns 0, we call blocking refill_read_buffer which may start the new chunk. There is no reason for get_avail_data to block.
Also note that that's not the interesting thing to test in regards to chunks handling. The tricky part is async request handling.
Jacek