BUG/MINOR: hpack: fix debugging output of pseudo header names

When a pseudo header is used, name.ptr is NULL and we must replace it
with hpack_idx_to_name(). This only affects code built with DEBUG_HPACK.

To be backported to 1.8.
This commit is contained in:
Willy Tarreau 2017-12-03 09:43:38 +01:00
parent 6377a0004f
commit 9e28f459b4

View File

@ -376,7 +376,7 @@ int hpack_decode_frame(struct hpack_dht *dht, const uint8_t *raw, uint32_t len,
}
hpack_debug_printf("\e[1;34m%s\e[0m: ",
istpad(trash.str, name).ptr);
istpad(trash.str, name.ptr ? name : hpack_idx_to_name(dht, idx)).ptr);
hpack_debug_printf("\e[1;35m%s\e[0m [idx=%d, used=%d]\n",
istpad(trash.str, value).ptr,