varnishtest "so_name sample fetche Test"

feature ignore_unknown_macro

haproxy h1 -conf {
    defaults
	timeout client 30s
	timeout server 30s
	timeout connect 30s
        mode http

    frontend fe
        bind "fd@${fe}" name foo
        http-request return status 200 hdr so-name %[so_name]

} -start

client c1 -connect ${h1_fe_sock} {
    txreq -url "/"
    rxresp
    expect resp.status == 200
    expect resp.http.so-name == "foo"
} -run
