]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: fix the race conditions in normalize_uri.vtc
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Feb 2022 16:04:37 +0000 (17:04 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Feb 2022 16:16:55 +0000 (17:16 +0100)
There is no connection reuse to avoid race conditions in HTTP reg-tests. But
time to time, normalize_uri.vtc still report "HTTP header incomplete"
error. It seems to be because HTTP keep-alive is still used at the session
level. Thus when the same server section is used to handle multiple requests
for the same client, via a "-repeat" statement, a new request for this client
may be handled by HAProxy before the server is restarted.

To avoid any trouble, HTTP keep-alive is disabled on the server side by
adding "Connection: close" header in responses. It seems to be ok now. We
let the CI decide.

reg-tests/http-rules/normalize_uri.vtc

index 129a4b1dbbfa2c04520e3807e33965b65a98f950..82c810718df18a26a79eb80440d59f97864724cd 100644 (file)
@@ -7,7 +7,7 @@ feature ignore_unknown_macro
 
 server s1 {
     rxreq
-    txresp
+    txresp -hdr "connection: close"
 } -repeat 70 -start
 
 haproxy h1 -conf {