]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: applet: State inbuf is no longer full if input data are skipped
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Jul 2025 07:05:45 +0000 (09:05 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Jul 2025 07:16:56 +0000 (09:16 +0200)
When data are skipped from the input buffer of an applet, we must take care
to notify the input buffer is no longer full. Otherwise, this could prevent
the stream to push data to the applet.

It is 3.3-specific. No backport needed.

include/haproxy/applet.h

index 65e1af67ea86d413dab6913b552203819474572a..261adfa1dc5362a177b6ef95cbc6a7c53eaf64d0 100644 (file)
@@ -324,8 +324,10 @@ static inline size_t applet_input_data(const struct appctx *appctx)
  */
 static inline void applet_skip_input(struct appctx *appctx, size_t len)
 {
-       if (appctx->flags & APPCTX_FL_INOUT_BUFS)
+       if (appctx->flags & APPCTX_FL_INOUT_BUFS) {
                b_del(&appctx->inbuf, len);
+               applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL);
+       }
        else
                co_skip(sc_oc(appctx_sc(appctx)), len);
 }