On 12/5/22 10:18, Hans Leidekker (@hans) wrote:
On Mon Dec 5 15:20:16 2022 +0000, **** wrote:
Paul Gofman replied on the mailing list:
One way how the things could be probably made much simpler is if we could get rid of refill_buffer() in the end of reading response (that would allow simpler splitting between send and receive part). Do you happen to know why that refill_buffer() was needed?
Looks like it has to do with reporting available data in chunked mode. If you remove it you'll see get an error from WinHttpQueryDataAvailable().
Thanks. I guess I will look if it is possible to remove refill buffer from receive_response and handle that in WinHttpQueryDataAvailable(). In my previous attempts to straighten up this patchset that refill_buffer() buffer in the end of receive_response() is the major source of complication. Besides, from what I saw in test_recursion() when exploring all the notifications is details, the moment when we fill it doesn't seem to match Windows anyway: there are more data receiving notifications on Windows which we don't have since we already filled the buffer when receiving response.