On Wed, Mar 09, 2011 at 04:41:49PM +0200, Florescu, Dan Alexandru wrote: > This works. Problem is that I cannot use acl's like the following: > hdr(User-Agent) -i WinampMPEG/5.60 > hdr(Host) -i 80.86.106.35 > > I guess this is because it receives the tcp stream and doen't analyze headers > anymore.
If the requests are enough HTTP compliant, then you might be able to use the above in TCP mode provided you wait for a complete HTTP request. It works like this : acl winamp hdr(User-Agent) -i WinampMPEG/5.60 tcp-request inspect-delay 5s tcp-request accept if HTTP use-backend XXX if winamp ... The idea is that the "tcp-request accept" ACL will wait until the contents parse as a valid HTTP request (at most 5s). Once this is OK, the ACLs relying on headers will be able to match. Regards, Willy

