1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00
libwebsockets/lib
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
..
abstract cleaning 2020-01-05 22:17:58 +00:00
core freertos: lws_cancel_service udp as pipe 2020-01-15 19:52:41 +00:00
core-net lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming 2020-01-20 10:02:56 +00:00
event-libs event-ops: rename accept member to sock_accept 2020-01-15 12:20:50 +00:00
jose lws_get_random: change length to size_t for coverity 2020-01-11 07:58:37 +00:00
misc linkit: support build using public sdk 2020-01-17 07:45:34 +00:00
plat linkit: support build using public sdk 2020-01-17 07:45:34 +00:00
roles lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming 2020-01-20 10:02:56 +00:00
system clean: codacy 2020-01-14 10:06:26 +00:00
tls openssl: disallow client connections if X509_VERIFY_PARAM_set1_host absent from tls lib 2020-01-17 07:45:35 +00:00
README.md cleaning 2020-01-05 22:17:58 +00:00

Library sources layout

Code that goes in the libwebsockets library itself lives down ./lib

Path Sources
lib/core Core lws code related to generic fd and wsi servicing and management
lib/core-net Core lws code that applies only if networking enabled
lib/event-libs Code containing optional event-lib specific adaptations
lib/jose JOSE / JWS / JWK / JWE implementations
lib/misc Code for various mostly optional miscellaneous features
lib/plat Platform-specific adaptation code
lib/roles Code for specific optional wsi roles, eg, http/1, h2, ws, raw, etc
lib/system Code for system-level features, eg, dhcpclient
lib/tls Code supporting the various TLS libraries