From f6ef63aa9d99d96aeef19c2664605dab4ef68987 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Fri, 8 May 2020 16:18:29 +0200 Subject: [PATCH] lib-http: test-http-client-errors: "reply payload" test - Make server announce that connection is closed. This prevents race condition between connection closure and client trying to reuse the connection. --- src/lib-http/test-http-client-errors.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index 717946f5d0..b6e9489af1 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -1031,6 +1031,7 @@ static void test_retry_payload_input(struct server_connection *conn) i_debug("Expected payload received"); o_stream_nsend_str(conn->conn.output, "HTTP/1.1 500 Oh no!\r\n" + "Connection: close\r\n" "Content-Length: 17\r\n" "\r\n" "Expected result\r\n"); @@ -1039,6 +1040,7 @@ static void test_retry_payload_input(struct server_connection *conn) str_sanitize(line, 128)); o_stream_nsend_str(conn->conn.output, "HTTP/1.1 501 Oh no!\r\n" + "Connection: close\r\n" "Content-Length: 19\r\n" "\r\n" "Unexpected result\r\n"); -- 2.47.3