From 840b0240bc4006b0d70176d7dbbce57a70eedf68 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 16 Mar 2016 10:09:55 +0000 Subject: [PATCH] MINOR: da: Using ARG12 macro for the sample fetch and the convertor. 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 | 4 ++-- doc/configuration.txt | 4 ++-- src/da.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index 13aa3b2bf..3e600e3b6 100644 --- 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 diff --git a/doc/configuration.txt b/doc/configuration.txt index 6b29df438..dc1a3fce9 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -11678,14 +11678,14 @@ da-csv-conv([,*]) 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 diff --git a/src/da.c b/src/da.c index a214b319c..d15e5735a 100644 --- a/src/da.c +++ b/src/da.c @@ -347,13 +347,13 @@ static struct cfg_kw_list dacfg_kws = {{ }, { /* Note: must not be declared 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 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 }, }}; -- 2.47.3