blob: 87e590a9b62d68e16103233114ec1f4ff708fba6 [file] [log] [blame]
Tim Duesterhus9947f772020-05-27 12:58:43 +02001varnishtest "Check that the unique ID TLV is properly sent for servers with ALPN option"
2
3#REQUIRE_VERSION=2.2
4#REQUIRE_OPTIONS=OPENSSL
5
6feature ignore_unknown_macro
7
8haproxy h1 -conf {
9 defaults
10 mode http
11 log global
12 unique-id-format %{+X}o\ TEST-%[req.hdr(in)]
13
14 listen sender
15 bind "fd@${feS}"
16
17 server example ${h1_feR_addr}:${h1_feR_port} send-proxy-v2 proxy-v2-options unique-id ssl alpn XXX verify none
18
19 listen receiver
20 bind "fd@${feR}" ssl crt ${testdir}/common.pem accept-proxy
21
22 http-request set-var(txn.proxy_unique_id) fc_pp_unique_id
23 http-after-response set-header proxy_unique_id %[var(txn.proxy_unique_id)]
24 http-request return status 200
25} -start
26
27# Validate that a correct header passes
28client c1 -connect ${h1_feS_sock} {
29 txreq -url "/" \
30 -hdr "in: foo"
31 rxresp
32 expect resp.http.proxy_unique_id == "TEST-foo"
33} -run