Hi List,

Attached a regtest which i 'think' should pass.

**   s1    0.0 === expect tbl.dec[1].key == ":authority"
---- s1    0.0 EXPECT tbl.dec[1].key (host) == ":authority" failed

It seems to me the Host <> Authority conversion isn't happening properly.? But maybe i'm just making a mistake in the test case...

I was using HA-Proxy version 2.0-dev0-f7a259d 2019/01/24 with this test.

The test was inspired by the attempt to connect to mail.google.com , as discussed in the "haproxy 1.9.2 with boringssl" mail thread.. Not sure if this is the main problem, but it seems suspicious to me..

Regards,

PiBa-NL (Pieter)

varnishtest "Check H1 client to H2 server with HTX."

feature ignore_unknown_macro

syslog Slog_1 -repeat 1 -level info {
    recv
} -start

server s1 -repeat 2 {
  rxpri
  stream 0 {
    txsettings
    rxsettings
    txsettings -ack
  } -run

  stream 1 {
    rxreq
    expect tbl.dec[1].key == ":authority"
    expect tbl.dec[1].value == "domain.tld"
    txresp
  } -run

} -start

haproxy h1 -conf {
    global
        log ${Slog_1_addr}:${Slog_1_port} len 2048 local0 debug err

    defaults
        mode http
        timeout client 2s
        timeout server 2s
        timeout connect 1s
        log global
        option http-use-htx

    frontend fe1
        option httplog
        bind "fd@${fe1}"
        default_backend b1
    backend b1
         server s1 ${s1_addr}:${s1_port} proto h2

    frontend fe2
        option httplog
        bind "fd@${fe2}" proto h2
        default_backend b2
    backend b2
      server s2 ${s1_addr}:${s1_port} proto h2

} -start

client c1 -connect ${h1_fe1_sock} {
        txreq -url "/" -hdr "host: domain.tld"
        rxresp
        expect resp.status == 200
} -run

client c2 -connect ${h1_fe2_sock} {
  txpri
  stream 0 {
    txsettings -hdrtbl 0
    rxsettings
  } -run
  stream 1 {
    txreq -req GET -url /3 -litIdxHdr inc 1 huf "domain.tld"
    rxresp
    expect resp.status == 200
  } -run
} -run

#syslog Slog_1 -wait

Reply via email to