From e502a5fb4449db7e01220692dd555b964466d5c0 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 14 Sep 2021 05:29:16 +0100 Subject: [PATCH] ss-h1: reset message state for repeated use This lets one "opportunistic" mode http policy SS be able to be used multiple times. --- lib/secure-streams/protocols/ss-h1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 2217bc4d6..1add8657b 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -475,6 +475,8 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, // __func__, wsi->lc.gutag); h->wsi = NULL; + h->hanging_som = 0; + h->subseq = 0; #if defined(LWS_WITH_SERVER) lws_pt_lock(pt, __func__); @@ -820,6 +822,7 @@ malformed: if (h->hanging_som) { h->info.rx(ss_to_userobj(h), NULL, 0, LWSSS_FLAG_EOM); h->hanging_som = 0; + h->subseq = 0; } wsi->http.writeable_len = h->writeable_len = 0;