]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client-errors - Make "retry payload" test more reliable.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 28 Apr 2020 21:59:39 +0000 (23:59 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 5 May 2020 06:17:30 +0000 (06:17 +0000)
src/lib-http/test-http-client-errors.c

index b370197866b7da22f40fc4123a8eda2196d198a9..fb4ae9ad8dff57bbd904cae0f2b64f9e9527817f 100644 (file)
@@ -1026,10 +1026,11 @@ static void test_retry_payload_input(struct server_connection *conn)
                i_fatal("server: Stream error: %s",
                        i_stream_get_error(conn->conn.input));
        }
-       if (conn->conn.input->eof)
-               i_fatal("server: Client stream ended prematurely");
-       if (line == NULL)
+       if (line == NULL) {
+               if (conn->conn.input->eof)
+                       i_fatal("server: Client stream ended prematurely");
                return;
+       }
 
        i_assert(ctx->eoh);