]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: 51d: In Hash Trie, multi header matching was affected by the header names stored...
authorBen51Degrees <Ben@51Degrees.com>
Tue, 5 Feb 2019 13:23:06 +0000 (13:23 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Feb 2019 20:29:08 +0000 (21:29 +0100)
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

index 20760d639ef81f87f2d48901c45638696b653541..a09d13968cc061a0ec8b02e81cc286d26aa4a2f1 100644 (file)
--- 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;
        }
 }