MINOR: http-htx: Use a dedicated function to check http reply validity
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 May 2020 13:02:59 +0000 (15:02 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 May 2020 16:27:13 +0000 (18:27 +0200)
commit7eea241c391c019e8352b55c2167717b09fbc944
tree9228059889b59e20c1d9b6a5b8aa88db57d4ca2d
parent47e791e22028df1f630b7a64afba46b225ab84d3
MINOR: http-htx: Use a dedicated function to check http reply validity

A dedicated function is added to check the validity of an http reply object,
after parsing. It is used to check the validity of http return rules.

For now, this function is only used to find the right error message in an
http-errors section for http replies of type HTTP_REPLY_ERRFILES (using
"errorfiles" argument). On success, such replies are updated to point on the
corresponding error message and their type is set to HTTP_REPLY_ERRMSG. If an
unknown http-errors section is referenced, anx error is returned. If a unknown
error message is referenced inside an existing http-errors section, a warning is
emitted and the proxy's error messages are used instead.
include/proto/http_htx.h
src/http_act.c
src/http_htx.c