diff --git a/lib/roles/h2/http2.c b/lib/roles/h2/http2.c index 5ae5339b2..9710f3a11 100644 --- a/lib/roles/h2/http2.c +++ b/lib/roles/h2/http2.c @@ -1300,6 +1300,13 @@ lws_h2_parse_frame_header(struct lws *wsi) assert(w->mux.sibling_list != w); } lws_end_foreach_ll(w, mux.sibling_list); + h2n->cont_exp = !(h2n->flags & LWS_H2_FLAG_END_HEADERS); + h2n->cont_exp_sid = h2n->sid; + h2n->cont_exp_headers = 1; + // lws_header_table_reset(h2n->swsi, 0); + +update_end_headers: + if (lws_check_opt(h2n->swsi->a.vhost->options, LWS_SERVER_OPTION_VH_H2_HALF_CLOSED_LONG_POLL)) { @@ -1319,12 +1326,6 @@ lws_h2_parse_frame_header(struct lws *wsi) h2n->swsi->h2.END_STREAM); } - h2n->cont_exp = !(h2n->flags & LWS_H2_FLAG_END_HEADERS); - h2n->cont_exp_sid = h2n->sid; - h2n->cont_exp_headers = 1; - // lws_header_table_reset(h2n->swsi, 0); - -update_end_headers: /* no END_HEADERS means CONTINUATION must come */ h2n->swsi->h2.END_HEADERS = !!(h2n->flags & LWS_H2_FLAG_END_HEADERS); diff --git a/lib/secure-streams/secure-streams-process.c b/lib/secure-streams/secure-streams-process.c index af428674b..5e5e80137 100644 --- a/lib/secure-streams/secure-streams-process.c +++ b/lib/secure-streams/secure-streams-process.c @@ -493,7 +493,7 @@ callback_ss_proxy(struct lws *wsi, enum lws_callback_reasons reason, n = 8; - lws_ser_wu32be((uint8_t *)&s[4], conn->ss->policy->client_buflen); + lws_ser_wu32be((uint8_t *)&s[4], conn->ss ? conn->ss->policy->client_buflen : 0); /* * If there's rideshare sequencing, it's added after the