From e0f6a2a2aa9a67f7e5590fb1621e04e48adfb894 Mon Sep 17 00:00:00 2001 From: Ben51Degrees Date: Tue, 5 Feb 2019 13:23:06 +0000 Subject: [PATCH] BUG: 51d: In Hash Trie, multi header matching was affected by the header names stored globaly. Some logic around mutli header matching in Hash Trie has been improved where only the name of the most important header was stored in the global heade_names structure. Now all headers are stored, so are used in the mutli header matching correctly. --- src/51d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/51d.c b/src/51d.c index 20760d639..a09d13968 100644 --- a/src/51d.c +++ b/src/51d.c @@ -541,8 +541,8 @@ void _51d_init_http_headers() global_51degrees.header_offsets = malloc(global_51degrees.header_count * sizeof(int32_t)); for (index = 0; index < global_51degrees.header_count; index++) { global_51degrees.header_offsets[index] = fiftyoneDegreesGetHttpHeaderNameOffset(ds, index); - global_51degrees.header_names->area = (char*)fiftyoneDegreesGetHttpHeaderNamePointer(ds, index); - global_51degrees.header_names->data = strlen(global_51degrees.header_names->area); + global_51degrees.header_names[index].area = (char*)fiftyoneDegreesGetHttpHeaderNamePointer(ds, index); + global_51degrees.header_names[index].data = strlen(global_51degrees.header_names[index].area); global_51degrees.header_names[index].size = global_51degrees.header_names->data; } }