1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib/roles/http
Andy Green 270f2f48c8 lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming
(Includes fixes from Yichen Gu)

Currently the incoming ebuf is always replaced to point to either a whole
buflist segment, or up to the (pt_serv_buf - LWS_PRE) length in the pt_serv_buf.

This is called on path for handling http read... some user code reasonably wants to
restrict the read size to what it can handle.

Change the other lws_buflist_aware_read() callers to zero ebuf before calling, and for
those have it keep the current behaviour; but if non-NULL ebuf.token on incoming, as
in http read path case, restrict both reported len of buflist content and the read length
to the incoming ebuf.len so the user code can control what it will get at one time.

Additionally muxed protocol wsi have no choice but to read what was sent to them
since it's HOL-blocking for other streams and its own WINDOW_UPDATEs.  So add an
internal param to lws_buflist_aware_read() forcing read even if buflist content
is available.
2020-01-20 10:02:56 +00:00
..
client lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming 2020-01-20 10:02:56 +00:00
compression cleaning 2020-01-05 22:17:58 +00:00
server linkit: support build using public sdk 2020-01-17 07:45:34 +00:00
header.c cleaning 2020-01-05 22:17:58 +00:00
lextable-strings.h lextable: fix x-forwarded-for 2019-12-20 18:42:29 +00:00
lextable.h lextable: fix x-forwarded-for 2019-12-20 18:42:29 +00:00
minilex.c cleaning 2020-01-05 22:17:58 +00:00
parsers.c ah: simple_create an empty string removes header entry 2020-01-10 10:05:35 +00:00
private-lib-roles-http.h basic auth: add callback option 2019-12-14 23:55:28 +00:00