From 56d07ec06c36ec088d5d80db752ba7ac9efb3699 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 10 Dec 2023 09:15:18 +0000 Subject: [PATCH] ss: support raw file --- lib/secure-streams/protocols/ss-raw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/secure-streams/protocols/ss-raw.c b/lib/secure-streams/protocols/ss-raw.c index 76b11ea10..0bb11aa5c 100644 --- a/lib/secure-streams/protocols/ss-raw.c +++ b/lib/secure-streams/protocols/ss-raw.c @@ -120,6 +120,16 @@ secstream_raw(struct lws *wsi, enum lws_callback_reasons reason, void *user, lwsl_info("%s: RAW_ADOPT\n", __func__); break; + /* chunks of chunked content, with header removed */ + case LWS_CALLBACK_RAW_RX_FILE: + in = p; + f = (int)read(wsi->desc.filefd, p, sizeof(buf) - LWS_PRE); + if (f < 0) + return 0; + len = (unsigned int)f; + + /* fallthru */ + /* chunks of chunked content, with header removed */ case LWS_CALLBACK_RAW_RX: if (!h || !h->info.rx)