Thanks for the patch! Other than a couple of style nitpicks it looks good.
> I could have looped the `recv()` call to collect all of the response, but that felt more complicated than adding a minor delay. The tests were verified against Windows 11 Pro (build 22621.3880).
I think it'd still be preferable, though. 100 ms isn't a lot, but those kinds of sleeps can build up, and we do want our tests to be as quick as possible. Perhaps more concerningly, if the timing is particularly bad, and 100 ms isn't enough, we'll get intermittent failures.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6216#note_78212
Elizabeth Figura (@zfigura) commented about dlls/http.sys/http.c:
> {
> if (send(conn->socket, response->buffer, response->len, 0) >= 0)
> {
> - if (conn->content_len)
> - {
> - /* Discard whatever entity body is left. */
> - memmove(conn->buffer, conn->buffer + conn->content_len, conn->len - conn->content_len);
> - conn->len -= conn->content_len;
> + /* Clean up the connection if we are not sending more response data. */
> + if (response->response_flags != HTTP_SEND_RESPONSE_FLAG_MORE_DATA) {
Brace on a new line, please, to match the existing style. There's another instance in 4/4.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6216#note_78211