]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: qpack: improve decoding function
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 14 Jun 2022 15:17:07 +0000 (17:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 15 Jun 2022 13:05:22 +0000 (15:05 +0200)
commitb666c6b26eae3f17eee058eb6bcc9fe1b1c304d2
tree36ea62fa9e265b37dc032183a5ca19975bb660ed
parent60ef19f137bad8cd97598970c708dd0bf4a89a70
MINOR: qpack: improve decoding function

Adjust decoding loop by using temporary ist for header name and value.
The header is inserted at the end of an iteration, which guarantee that
we do not insert name only in the list in case of an error on value
decoding. This also helps the function readability by centralizing the
LIST insert operation.

The return value of the decoding function is also changed. Now on
success the number of headers inserted in the input list is returned.
This change as no impact as success value is not used by the caller.
This is mainly done to have a behavior similar to hpack decoding
function.
src/qpack-dec.c