Skip to content

Commit

Permalink
Fix test case for different Windows sockets behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 14, 2024
1 parent 65a3c93 commit b42919e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/vibe.http.client.1426/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit b42919e

Please sign in to comment.