]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: haterm: Remove duplicated bloc to know if haterm must drain
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 May 2026 06:44:28 +0000 (08:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 May 2026 16:36:34 +0000 (18:36 +0200)
When haterm was waiting for request headers, there was two test to know if
it had to drain the request data before replying. One of them was useless
and was thus removed.

src/haterm.c

index 89d6d5ab51d31a3f5b087c93d23f59566a9393a6..05ec35e97a0435ec7c2ef390ea22d23f012cf309 100644 (file)
@@ -991,15 +991,6 @@ static struct task *process_hstream(struct task *t, void *context, unsigned int
                /* HTX send the start line and headers if not already sent */
                if (!hstream_sl_hdrs_htx_buf_snd(hs, conn))
                        goto err;
-
-               if (hstream_must_drain(hs)) {
-                       /* The request must be drained before sending the response (HS_ST_OPT_REQ_AFTER_RES not set).
-                        * The body will be drained upon next wakeup.
-                        */
-                       TRACE_STATE("waking up task", HS_EV_HSTRM_IO_CB, hs);
-                       task_wakeup(hs->task, TASK_WOKEN_IO);
-                       goto out;
-               }
        }
        else {
                struct buffer *buf;