From: Ben51Degrees Date: Tue, 5 Feb 2019 13:23:06 +0000 (+0000) Subject: BUG: 51d: In Hash Trie, multi header matching was affected by the header names stored... X-Git-Tag: v2.0-dev1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0f6a2a2aa9a67f7e5590fb1621e04e48adfb894;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/51d.c b/src/51d.c index 20760d639e..a09d13968c 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; } }