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

h2-fix-fileserving-2

This commit is contained in:
Andy Green 2021-07-23 04:23:59 +01:00
parent a82219b0fc
commit 1de1aafca5

View file

@ -2966,9 +2966,8 @@ int lws_serve_http_file_fragment(struct lws *wsi)
if (nwsi->h2.h2n &&
poss > (lws_filepos_t)nwsi->h2.h2n->peer_set.s[H2SET_MAX_FRAME_SIZE])
poss = (lws_filepos_t)nwsi->h2.h2n->peer_set.s[H2SET_MAX_FRAME_SIZE];
poss = poss - (lws_filepos_t)(n - LWS_H2_FRAME_HEADER_LENGTH);
#endif
poss = poss - (lws_filepos_t)(n + LWS_H2_FRAME_HEADER_LENGTH);
if (wsi->http.tx_content_length)
if (poss > wsi->http.tx_content_remain)