blob: 136fe4e78af6f9f39dc5307bff10a3ea9432685a [file] [log] [blame]
Amaury Denoyelled86ae4b2021-01-26 14:35:23 +01001varnishtest "Test the http-reuse always mode"
2
3#REQUIRE_VERSION=2.2
4
5feature ignore_unknown_macro
6
7haproxy h1 -conf {
8 defaults
9 mode http
10
11 listen sender
12 bind "fd@${feS}"
13 http-reuse always
14 server srv ${h1_feR_addr}:${h1_feR_port}
15
16 listen receiver
17 bind "fd@${feR}"
18 http-request return status 200
19 http-after-response set-header http_first_request %[http_first_req]
20} -start
21
22# bootstrap
23client c1 -connect ${h1_feS_sock} {
24 txreq
25 rxresp
26 expect resp.http.http_first_request == "1"
27} -run
28
29client c2 -connect ${h1_feS_sock} {
30 txreq
31 rxresp
32 expect resp.http.http_first_request == "0"
33
34 txreq
35 rxresp
36 expect resp.http.http_first_request == "0"
37} -run
38
39client c3 -connect ${h1_feS_sock} {
40 txreq
41 rxresp
42 expect resp.http.http_first_request == "0"
43} -run