From: David Carlier <[email protected]>
The user-agent evidence id used by da-csv-conv was only computed at init.
Ids belong to the data file, so after a hot-reload of a file with a
different header list, da-csv-conv could pass a stale id and return wrong
or empty properties until restart.
This should be backported to lower branches.
---
addons/deviceatlas/da.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/deviceatlas/da.c b/addons/deviceatlas/da.c
index 902ceaeaf..30c75517e 100644
--- a/addons/deviceatlas/da.c
+++ b/addons/deviceatlas/da.c
@@ -331,6 +331,8 @@ static void da_haproxy_checkinst(void)
cold = global_deviceatlas.atlasimgptr;
global_deviceatlas.atlasimgptr = cnew;
global_deviceatlas.atlas = inst;
+ global_deviceatlas.useragentid =
da_atlas_header_evidence_id(&global_deviceatlas.atlas,
+ "user-agent");
global_deviceatlas.maxhdrlen = maxhdrlen;
thread_release();
free(cold);
--
2.55.0