From b42919e339cddd429c5757a0bedf77d815122c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Wed, 14 Feb 2024 21:14:00 +0100 Subject: [PATCH] Fix test case for different Windows sockets behavior. --- tests/vibe.http.client.1426/source/app.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/vibe.http.client.1426/source/app.d b/tests/vibe.http.client.1426/source/app.d index bfb1072d62..6b50478694 100644 --- a/tests/vibe.http.client.1426/source/app.d +++ b/tests/vibe.http.client.1426/source/app.d @@ -9,8 +9,11 @@ extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0" ]; int main () { immutable serverAddr = listenTCP(0, (TCPConnection c) @safe nothrow { - try c.write("HTTP/1.1 200 OK\r\nConnection: Close\r\n\r\nqwerty"); - catch (Exception e) assert(0, e.msg); + try { + // skip request + c.readUntil(cast(immutable(ubyte)[])"\r\n\r\n"); + c.write("HTTP/1.1 200 OK\r\nConnection: Close\r\n\r\nqwerty"); + } catch (Exception e) assert(0, e.msg); }, "127.0.0.1").bindAddress; runTask({