websocket: improve handling of 0-len frames

Write out 9-length frames to client's WRITEFUNCTION
Read 0-length frames from READFUNCTION *if* the function
started a new frame via `curl_ws_start_frame()`.

Fixes #18286
Closes #18332
Reported-by: Andriy Druk
This commit is contained in:
Stefan Eissing 2025-08-18 17:12:35 +02:00 committed by Daniel Stenberg
parent fd2a204c23
commit fa3baabbd8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 275 additions and 141 deletions

View file

@ -656,8 +656,7 @@ const struct Curl_crtype Curl_httpchunk_encoder = {
Curl_creader_def_needs_rewind,
cr_chunked_total_length,
Curl_creader_def_resume_from,
Curl_creader_def_rewind,
Curl_creader_def_unpause,
Curl_creader_def_cntrl,
Curl_creader_def_is_paused,
Curl_creader_def_done,
sizeof(struct chunked_reader)