]> git.kaiwu.me - haproxy.git/commit
MINOR: http-ana: Add a function to set HTTP termination flags
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 08:06:38 +0000 (09:06 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 08:45:23 +0000 (09:45 +0100)
commit71236dedb959e4b707411e0e9be2248452f4d927
treee0d5dfcdd51735a9b7c9415e1c0040f083ab3d41
parentc1b013bc61e165cd54fc3e4c538f95ba0c0104c6
MINOR: http-ana: Add a function to set HTTP termination flags

There is already a function to set termination flags but it is not well
suited for HTTP streams. So a function, dedicated to the HTTP analysis, was
added. This way, this new function will be called for HTTP analysers on
error. And if the error is not caugth at this stage, the generic function
will still be called from process_stream().

Here, by default a PRXCOND error is reported and depending on the stream
state, the reson will be set accordingly:

  * If the backend SC is in INI state, SF_FINST_T is reported on tarpit and
    SF_FINST_R otherwise.

  * SF_FINST_Q is the server connection is queued

  * SF_FINST_C in any connection attempt state (REQ/TAR/ASS/CONN/CER/RDY).
    Except for applets, a SF_FINST_R is reported.

  * Once the server connection is established, SF_FINST_H is reported while
    HTTP_MSG_DATA state on the response side.

  * SF_FINST_L is reported if the response is in HTTP_MSG_DONE state or
    higher and a client error/timeout was reported.

  * Otherwise SF_FINST_D is reported.
include/haproxy/http_ana.h
src/http_ana.c