From: Willy Tarreau Date: Tue, 22 Sep 2026 04:14:57 +0000 (+0000) Subject: REGTESTS: connection: do not race with the reset in the expect-proxy test X-Git-Tag: v3.5-dev8~38 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=e84a74adc1ee2571f1fd5dfae23f6eb4caddfc4b;p=haproxy.git REGTESTS: connection: do not race with the reset in the expect-proxy test The client which sends a malformed PROXY header also sent a request behind it. The connection is reset as soon as the header line is complete, so on a build where the reset comes back fast enough the write of the request fails with ECONNRESET instead of succeeding, and the test fails. Nothing needs to be sent after the bad header. --- diff --git a/reg-tests/connection/expect_proxy.vtc b/reg-tests/connection/expect_proxy.vtc index 481eb6e2a..cde558c8f 100644 --- a/reg-tests/connection/expect_proxy.vtc +++ b/reg-tests/connection/expect_proxy.vtc @@ -63,9 +63,9 @@ client c2 -connect ${h1_fe1_sock} { } -run client c3 -connect ${h1_fe1_sock} { - # a malformed header is rejected as well + # a malformed header is rejected as soon as its line is complete, so + # nothing else is sent here: the request would race with the reset send "PROXY TCP4 not an address at all\r\n" - txreq expect_close } -run