http2_hpack: Reorganize header addition for clarity
Instead of passing both a decoder and individual decoder fields, the signature for h2h_addhdr() changed to only take the decoder. The order of parameters is destination first, then the source following the calling conventon of functions like memcpy(). Internally the function is reorganized with a bunch of txt variables to keep track of the header being added, its name and value. In addition to clarity, this also helps improve safety and correctness. For example the :authority pseudo-header name is erased in place to turn it into a regular host header, but having a dedicated txt for the header name allows its preservation.
Showing
Please register or sign in to comment