]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] http: *_dom matching header functions now also split on ":"
authorFinn Arne Gangstad <finnag@pvv.org>
Fri, 9 Sep 2011 14:09:50 +0000 (16:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Sep 2011 14:10:12 +0000 (16:10 +0200)
commite8c7ecc2ddecab4366a46cd949dc8a56d425fabc
treef3d2dddcaa3df8d0220f9501857f36520ee54fcb
parentb0f7532a30b3322b13dec7fe3460f4ec907bdbc3
[MINOR] http: *_dom matching header functions now also split on ":"

*_dom is mostly used for matching Host headers, and host headers may
include port numbers. To avoid having to create multiple rules with
and without :<port-number> in hdr_dom rules, change the *_dom
matching functions to also handle : as a delimiter.

Typically there are rules like this in haproxy.cfg:

  acl is_foo  hdr_dom(host) www.foo.com

Most clients send "Host: www.foo.com" in their HTTP header, but some
send "Host: www.foo.com:80" (which is allowed), and the above
rule will now work for those clients as well.

[Note: patch was edited before merge, any unexpected bug is mine /willy]
src/acl.c