Hi All,

I’m playing with the new set-path feature and encountered a bug. I’m using 
1.6-dev1 plus all the patches up to Apr 22nd, I think we’re all clear that 
set-path was not working at all in 1.6-dev1 itself. It does now work but not in 
all situations I’d expect.

My config is below. I do nc -lk 8000 for the backend. For the first three 
cases, I see the right HTTP request printed there. For the fourth, nothing, and 
haproxy generates a 503. This is true if backend.map is empty (and thus the 
default "back" should be chosen, which does exist) or it can contain valid 
mappings to "back" and still returns 503 for requests with a matching Host 
header.


global
  nbproc 1

defaults
  mode http
  log global
  balance roundrobin
  option httplog
  option log-health-checks
  option log-separate-errors
  option forwardfor
  option redispatch
  retries 4
  option http-server-close
  timeout client 150s
  timeout server 1h
  timeout connect 5s
  timeout queue 5s

frontend front
  bind :9000

  # comment out as appropriate

  # case 1: works
  use_backend %[hdr(host),map(backend.map,back)]

  # case 2: works
  use_backend back

  # case 3: works
  http-request set-path /foo
  use_backend back

  # case 4: fails (503 response, no request sent to backend)
  # backend.map can be empty or contain a valid mapping
  http-request set-path /foo
  use_backend %[hdr(host),lower,map(backend.map,back)]

backend back
  server server1 127.0.0.1:8000 weight 10 check inter 7s


Reply via email to