From ebed4aaf0136392d8f040de16a29d89777323fb3 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Sun, 19 Apr 2026 10:10:58 +0200 Subject: [PATCH] ws: fix a blocking curl_ws_send() to report written length correctly Fixes #21372 Reported-by: Yiwei Hou Clkoses #21373 --- lib/ws.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ws.c b/lib/ws.c index 5cf1f24841..7688803953 100644 --- a/lib/ws.c +++ b/lib/ws.c @@ -1749,6 +1749,8 @@ static CURLcode ws_send_raw(struct Curl_easy *data, const void *buffer, if(result) return result; result = ws_send_raw_blocking(data, ws, buffer, buflen); + if(!result) + *pnwritten = buflen; } else { /* We need any pending data to be sent or EAGAIN this call. */