MINOR: h3: adjust error reporting on sending
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 13 May 2024 15:27:26 +0000 (17:27 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 16 May 2024 08:31:17 +0000 (10:31 +0200)
commit079d13f73f61287229486c086415e58aa7a2f112
tree79d9ea860d9cb8963313012d07f8e4705b8b01a1
parente0944123378c5bc1dba8e43d3b3a9979c56e150c
MINOR: h3: adjust error reporting on sending

It's currently difficult to differentiate HTTP/3 standard protocol
violation from internal issues which use solely H3_INTERNAL_ERROR code.
This patch aims is the first step to simplify this. The objective is to
reduce H3_INTERNAL_ERROR. <err> field of h3c should be reserved
exclusively to other values.

Simplify error management in sending via h3_snd_buf(). Sending side is
straightforward as only internal errors can be encountered. Do not
manually set h3c.err to H3_INTERNAL_ERROR in HTX to HTTP/3 various
conversion function. Instead, just return a negative value which is
enough to break h3_snd_buf() loop. H3_INTERNAL_ERROR is thus positionned
on a single location in this function for all sending operations.
src/h3.c