In my test of 1.5dev21, I found the following acl failed:

acl  my_host req.hdr(host) -m str www.mytest.com
   use_backend www if  my_host


and result in an 503 error(because there is no default backend).

I tried :
   1. my_host req.hdr(host) -m beg www.mytest.com
   2. my_host req.hdr(host) -m end www.mytest.com
 3. my_host req.hdr(host) -m sub www.mytest.com

and all of them works OK.

I test it  with "wget http://www.mytest.com/";

The haproxy debug output is :

failed case:

00000001:ap.accept(0005)=0006 from [127.0.0.1:41462]
00000001:ap.clireq[0006:ffffffff]: GET / HTTP/1.0
00000001:ap.clihdr[0006:ffffffff]: User-Agent: Wget/1.12 (linux-gnu)
00000001:ap.clihdr[0006:ffffffff]: Accept: */*
00000001:ap.clihdr[0006:ffffffff]: Host: www.mytest.com
00000001:ap.clihdr[0006:ffffffff]: Connection: Keep-Alive
00000001:ap.clicls[0006:ffffffff]
00000001:ap.closed[0006:ffffffff]




success case:

00000001:ap.accept(0005)=0006 from [127.0.0.1:41460]
00000001:ap.clireq[0006:ffffffff]: GET / HTTP/1.0
00000001:ap.clihdr[0006:ffffffff]: User-Agent: Wget/1.12 (linux-gnu)
00000001:ap.clihdr[0006:ffffffff]: Accept: */*
00000001:ap.clihdr[0006:ffffffff]: Host: www.mytest.com
00000001:ap.clihdr[0006:ffffffff]: Connection: Keep-Alive
00000001:www.srvrep[0006:0007]: HTTP/1.1 200 OK
00000001:www.srvhdr[0006:0007]: Date: Mon, 23 Dec 2013 07:40:30 GMT
00000001:www.srvhdr[0006:0007]: Server: Apache/2.2.8 (Win32)
mod_python/3.3.1 Python/2.5.4
00000001:www.srvhdr[0006:0007]: Last-Modified: Tue, 20 Aug 2013 09:18:56 GMT
00000001:www.srvhdr[0006:0007]: ETag: "100000000fb2d-440-4e45d8be15ee8"
00000001:www.srvhdr[0006:0007]: Accept-Ranges: bytes
00000001:www.srvhdr[0006:0007]: Content-Length: 1088
00000001:www.srvhdr[0006:0007]: Connection: close
00000001:www.srvhdr[0006:0007]: Content-Type: text/html
00000001:www.srvcls[0006:0007]
00000001:www.clicls[0006:0007]
00000001:www.closed[0006:0007]





BR,
DeltaY

Reply via email to