[llvm] [HTTP][Windows] Apply the configured timeout to WinHttpReceiveResponse (PR #226172)

Charles Zablit via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 07:39:13 PDT 2026


charles-zablit wrote:

> Thank you! How is this not documented on the documentation for [WinHttpSetTimeouts](https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsettimeouts)?

[`WinHttpSetTimeouts`](https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsettimeouts) describes `nReceiveTimeout` as the time "to receive a response to a request". However the wait for response headers in `WinHttpReceiveResponse` is actually governed by [`WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT`](https://learn.microsoft.com/en-us/windows/win32/winhttp/option-flags#winhttp_option_receive_response_timeout). 

It defaults to 90s and is only documented on that option page. That page also notes the timeout is only checked when data arrives from the socket.

https://github.com/llvm/llvm-project/pull/226172


More information about the llvm-commits mailing list