1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib/core-net
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
..
adopt.c event-ops: rename accept member to sock_accept 2020-01-15 12:20:50 +00:00
client.c cleaning 2020-01-05 22:17:58 +00:00
close.c mux children: generalize helpers out of h2 implementation 2019-12-29 19:59:16 +00:00
connect.c tls: apply restriction if any also to client connections 2020-01-15 16:32:48 +00:00
detailed-latency.c detailed latency stats 2019-09-22 03:06:59 -07:00
dummy-callback.c cleaning 2020-01-05 22:17:58 +00:00
lws-dsh.c Coverity fixes 2019-08-19 10:12:20 +01:00
network.c windows: clean type warnings 2020-01-11 14:04:50 +00:00
output.c windows: clean type warnings 2020-01-11 14:04:50 +00:00
pollfd.c cleaning 2020-01-05 22:17:58 +00:00
private-lib-core-net.h lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming 2020-01-20 10:02:56 +00:00
sequencer.c private.h: rename to contain dir 2019-08-15 10:49:52 +01:00
server.c windows: clean type warnings 2020-01-11 14:04:50 +00:00
service.c lws_buflist_aware_read: restrict to incoming ebuf length if non-NULL ebuf.token incoming 2020-01-20 10:02:56 +00:00
sorted-usec-list.c lws_system: helpers for attaching to existing event loop from other threads 2020-01-05 22:17:58 +00:00
state.c fail paths: deregister notifier and be sure adopt returns NULL 2019-12-06 17:14:28 +00:00
stats.c cleaning 2020-01-05 22:17:58 +00:00
vhost.c h2: stream binding: do not try to join existing connection until migrated 2020-01-17 18:54:44 +00:00
wsi-timeout.c cleaning 2020-01-05 22:17:58 +00:00
wsi.c linkit: support build using public sdk 2020-01-17 07:45:34 +00:00