MINOR: h1-htx: Update h1 parsing functions to return result as a size_t
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Feb 2021 15:37:28 +0000 (16:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 25 May 2021 08:41:50 +0000 (10:41 +0200)
commitde471a4a8d0a7cb57c5b41b3555d004ff97ebbed
treed0f614d358635d310b518128bcdb21596e76e4de
parent3e6690a55513f2c10dfc7875b9ec2bb5333dee5f
MINOR: h1-htx: Update h1 parsing functions to return result as a size_t

h1 parsing functions (h1_parse_msg_*) returns the number of bytes parsed or
0 if nothing is parsed because an error occurred or some data are
missing. But they never return negative values. Thus, instead of a signed
integer, these function now return a size_t value.

The H1 and FCGI muxes are updated accordingly. Note that h1_parse_msg_data()
has been slightly adapted because the parsing of chunked messages still need
to handle negative values when a parsing error is reported by
h1_parse_chunk_size() or h1_skip_chunk_crlf().
include/haproxy/h1_htx.h
src/h1_htx.c
src/mux_fcgi.c
src/mux_h1.c