]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hpack: implement the header tables management
authorWilly Tarreau <w@1wt.eu>
Tue, 30 May 2017 16:46:58 +0000 (18:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:03:24 +0000 (18:03 +0100)
commitce04094c4a5a7d3db4115dfb4cd20ab654a90aff
tree6d3540c8d1a164f495e68ef096f09cfd47502bbb
parenta004ade512cddb5f9ed4a077c6f3cc85aeaa72b0
MINOR: hpack: implement the header tables management

This code deals with header insertion, retrieval and eviction, as well
as with dynamic header table defragmentation. It is functional for use
as a decoder and was heavily tested in this context. There's still some
room for optimization (eg: the defragmentation code currently does it
in place using a memcpy).

Also for now the dynamic header table is allocated using malloc() while
a pool needs to be created instead.

This code was mostly imported from https://github.com/wtarreau/http2-exp
with "hpack_" prepended in front of most names to avoid risks of conflicts.
Some small cleanups and renamings were applied during the import. This
version must be considered more recent.

Some HPACK error codes were placed here (HPACK_ERR_*), not exactly because
they're needed by the decoder but they'll be needed by all callers. Maybe
a different location should be found.
Makefile
include/common/hpack-tbl.h [new file with mode: 0644]
src/hpack-tbl.c [new file with mode: 0644]