]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: http_htx: use enum for arbitrary values in conf_errors
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 16 Mar 2026 15:50:00 +0000 (16:50 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 23 Mar 2026 09:51:33 +0000 (10:51 +0100)
commitfedaf054c4d17a2f0eba93efbd6c059226ddcb3f
treebfc97828019f8e2fe32e35061904e8a44b339f4f
parent8e469ebf2ebef565d3fcaa0d6ad9ac5998734e24
MINOR: http_htx: use enum for arbitrary values in conf_errors

In conf_errors struct, arbitrary integer values were used for both
<type> field and <status> array. This renders the code difficult to
follow.

Replaces these values with proper enums type. Two new types are defined
for each of these fields. The first one represents the directive type,
derived from the keyword used (errorfile vs errorfiles). This directly
represents which part of <info> union should be manipulated.

The second enum is used for errorfiles directive with a reference on a
http-errors section. It indicates whether or not if a status code should
be imported from this section, and if this import is explicit or
implicit.
include/haproxy/http_htx-t.h
src/http_htx.c