]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client-errors: Address another reliability issue in "peer reuse...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 13 Sep 2018 07:16:41 +0000 (09:16 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Nov 2018 11:21:53 +0000 (13:21 +0200)
src/lib-http/test-http-client-errors.c

index 225cbb45b1dc785397bb8e4ba9045e77338c3f9d..2332ef7119be745d836d3a37902482dd22180eb2 100644 (file)
@@ -2665,7 +2665,7 @@ test_client_peer_reuse_failure_response2(
        if (debug)
                i_debug("RESPONSE: %u %s", resp->status, resp->reason);
 
-       test_assert((resp->status / 100) > 2);
+       test_assert(http_response_is_internal_error(resp));
        test_assert(resp->reason != NULL && *resp->reason != '\0');
        i_free(ctx);
        io_loop_stop(ioloop);
@@ -2699,7 +2699,7 @@ test_client_peer_reuse_failure_response1(
                ctx->first = FALSE;
                ctx->to = timeout_add_short(500, test_client_peer_reuse_failure_next, ctx);
        } else {
-               test_assert(resp->status == HTTP_CLIENT_REQUEST_ERROR_CONNECT_FAILED);
+               test_assert(http_response_is_internal_error(resp));
        }
 
        test_assert(resp->reason != NULL && *resp->reason != '\0');