1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss: make sure to use LWS_WRITE_HTTP_FINAL with SS EOM flag

When most of ss-h2 was combined into ss-h1 during development, the h2 difference
about needing HTTP_FINAL to signal h2 FIN flag was accidentally dropped.  In
many cases the peer can infer it, from, eg, content-length reached.  But we need
to replace explicitly doing it to cover all cases.
This commit is contained in:
Andy Green 2020-05-11 15:08:52 +01:00
parent ee3b4a4b81
commit b3576e7205

View file

@ -514,7 +514,8 @@ malformed:
lws_ptr_diff(p, buf + LWS_PRE), f);
if (lws_write(wsi, buf + LWS_PRE, lws_ptr_diff(p, buf + LWS_PRE),
LWS_WRITE_HTTP) != (int)lws_ptr_diff(p, buf + LWS_PRE)) {
(f & LWSSS_FLAG_EOM) ? LWS_WRITE_HTTP_FINAL : LWS_WRITE_HTTP) !=
(int)lws_ptr_diff(p, buf + LWS_PRE)) {
lwsl_err("%s: write failed\n", __func__);
return -1;
}