]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: da: Using ARG12 macro for the sample fetch and the convertor.
authorDavid Carlier <dcarlier@afilias.info>
Wed, 16 Mar 2016 10:09:55 +0000 (10:09 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Mar 2016 04:44:33 +0000 (05:44 +0100)
Regarding the minor update introduced in the
cd6c3c7cb4fdc9cf694b62241840e3fea30e03dd commit, the DeviceAtlas
module is now able to use up to 12 device properties via the
new ARG12 macro.

README
doc/configuration.txt
src/da.c

diff --git a/README b/README
index 13aa3b2bf0c7361f40f931eeb7ef32fbced19b78..3e600e3b68d8a69da269d0942452d2349b6cf1c4 100644 (file)
--- a/README
+++ b/README
@@ -259,11 +259,11 @@ cases.
 
 All HTTP headers via the sample / fetch
 
-    http-request set-header X-DeviceAtlas-Data %[da-csv-fetch(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
+    http-request set-header X-DeviceAtlas-Data %[da-csv-fetch(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
 
 Single HTTP header (e.g. User-Agent) via the convertor
 
-    http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv-conv(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
+    http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv-conv(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
 
 # Mobile content switching with ACL
 
index 6b29df43892d344bde6e6060c77cbb41b5ae35cf..dc1a3fce9b425ff71544017c2ea51c2914e7c451 100644 (file)
@@ -11678,14 +11678,14 @@ da-csv-conv(<prop>[,<prop>*])
   input, and to emit a string made of the concatenation of the properties
   enumerated in argument, delimited by the separator defined by the global
   keyword "deviceatlas-property-separator", or by default the pipe character
-  ('|'). There's a limit of 5 different properties imposed by the haproxy
+  ('|'). There's a limit of 12 different properties imposed by the haproxy
   configuration language.
 
   Example:
     frontend www
       bind *:8881
       default_backend servers
-      http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
+      http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
 
 debug
   This converter is used as debug tool. It dumps on screen the content and the
index a214b319cf6f8da802f00dcf5c1e2f6dad8b27b7..d15e5735a154d13824bbf2b837ec896166bc7c2a 100644 (file)
--- a/src/da.c
+++ b/src/da.c
@@ -347,13 +347,13 @@ static struct cfg_kw_list dacfg_kws = {{ }, {
 
 /* Note: must not be declared <const> as its list will be overwritten */
 static struct sample_fetch_kw_list fetch_kws = {ILH, {
-       { "da-csv-fetch", da_haproxy_fetch, ARG5(1,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_USE_HRQHV },
+       { "da-csv-fetch", da_haproxy_fetch, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_USE_HRQHV },
        { NULL, NULL, 0, 0, 0 },
 }};
 
 /* Note: must not be declared <const> as its list will be overwritten */
 static struct sample_conv_kw_list conv_kws = {ILH, {
-       { "da-csv-conv", da_haproxy_conv, ARG5(1,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_T_STR },
+       { "da-csv-conv", da_haproxy_conv, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_T_STR },
        { NULL, NULL, 0, 0, 0 },
 }};