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

651 commits

Author SHA1 Message Date
Andy Green
7333fcc9cd coverity 472861: http2: deal with zero length data without overflow 2025-01-19 16:59:34 +00:00
Andy Green
ff0e0f3c35 coverity 472860: ops-h2: let coverity see all err enums covered
x
2025-01-19 16:59:25 +00:00
Andy Green
b81b24d10e coverity 472863: cookies: length check order wrong 2025-01-19 16:59:17 +00:00
Andy Green
dc65edd519 spa: use sized local info rather than incoming
We allow a default 0 length in the incoming const info to mean a default
size (of 512).  We implement it by copying the incoming const info to a
copy in the spa that we can adapt, which is all good.

But in two cases after we dumbly use the incoming const info directly
instead of the adapted copy.

https://github.com/warmcat/libwebsockets/issues/3294
2024-12-13 09:23:07 +00:00
Orgad Shaneh
c4b1e34a50 clean: var unused when no logs 2024-11-16 09:08:31 +00:00
Andy Green
2ca5d8605b ws: increase sanity check for spins needed to consume buffer to 100
https://github.com/warmcat/libwebsockets/issues/3184
2024-09-25 08:53:41 +01:00
zzblydia
ca375a4cab client hs: fix segmentation fault
https://github.com/warmcat/libwebsockets/pull/3171
2024-06-24 09:09:00 +01:00
p-luke
eac4489237 netlink: when binding the per-context socket, let the kernel choose the unicast address.
When using multiple client contextes in a single application, rops_pt_init_destroy_netlink() fails binding the second socket and on - only the first one succeeds. The failure is made obvious by this log:
  W: rops_pt_init_destroy_netlink: netlink bind failed

So, let's fix this by doing what netlink(7) man page suggests:
  If the application sets nl_pid before calling bind(2), then it is up to the
  application to make sure that nl_pid is unique. If the application sets it
  to 0, the kernel takes care of assigning it. The kernel assigns the process
  ID to the first netlink socket the process opens and assigns a unique nl_pid
  to every netlink socket that the process subsequently creates.
2024-03-20 07:29:48 +00:00
Liu DongMiao
6901c32a9d raw-skt: don't read more than rx_buffer_size
When other roles like ws reading data, they follow `rx_buffer_size`, then fallback to context's `pt_serv_buf_size`.
However, `raw-skt` don't follow `rx_buffer_size`, always use 0, then fallback to `pt_serv_buf_size`.

This PR make `raw-skt` don't read more than `rx_buffer_size` data.
2024-03-07 09:50:47 +00:00
Liu DongMiao
893ff81a8d raw: connect callback can be triggered twice 2024-03-07 09:50:33 +00:00
Lonny Wong
bfa67ecf0c pmd: revert #3014 and drain extensions before next ssl read 2023-11-24 05:52:12 +00:00
Lonny Wong
eba1e4aa7f pmd: fix buffer being reused while draining extensions 2023-11-21 17:10:48 +00:00
tjwalton
3179273eae server: Always return result of _lws_vhost_init_server_af
Fixes https://github.com/warmcat/libwebsockets/issues/2702
2023-11-15 08:26:46 +00:00
Edward Zhang
c097a44405 pmd: fix ws parser for non pmd packet with pmd ext enabled 2023-11-13 09:16:16 +00:00
Carsten Schuette
08ee6f14de clean: gcc13 false positive uninitialized
https://github.com/warmcat/libwebsockets/issues/3004
2023-11-10 11:16:53 +00:00
qdztxc
0a5526b958 ws: tell caller we closed wsi on handshake failure
https://github.com/warmcat/libwebsockets/issues/2681
2022-07-12 09:48:47 +01:00
Marco Gratzke
ee2e4074e4 spa: file upload fix 2022-07-04 14:21:38 +01:00
Paul Shark
fe107059fc http: server: correct plugin name in error 2022-06-14 07:34:34 +01:00
Andy Green
ebabf49bce http: server: mounts: dont assume Basic Auth if no FILE_OPS 2022-06-10 13:35:39 +01:00
Richard Shi
5a008cf282 http: compression: fix selection
https://github.com/warmcat/libwebsockets/issues/2633
2022-05-17 15:53:53 +01:00
Chunho Lee
8b1693a05e ss: mqtt: add support for AWS IoT Shadow topic
This introduces AWS IoT Shadow topic support. This subscribes and
unsubscribes shadow response topics before and after shadow topic
is transmitted.
2022-05-17 15:53:53 +01:00
Chunho Lee
21baf47aed ss: mqtt: add QOS_NACK_REMOTE state on PUBLISH failure
This adds setting QOS_NACK_REMOTE state when QoS 1/2 PUBLISH
transmissions and all retries are unacked and failed. Also this
allows state transitions between QOS_ACK_REMOTE and QOS_NACK_REMOTE.
2022-05-17 15:37:16 +01:00
Chunho Lee
fe0a5b8bb9 mqtt: fix wrong awsiot field set on SUBSCRIBE 2022-05-17 15:37:16 +01:00
Orefkov
6108d681ca h2: access log: POST: prepare log
https://github.com/warmcat/libwebsockets/issues/2608
2022-05-17 15:37:16 +01:00
Andy Green
9e658fa996 threadpool: improve relationship with LWS_HAVE_PTHREAD_H
Make it clear in more places that threadpool is only built if pthreads
available.

https://github.com/warmcat/libwebsockets/issues/2607
2022-05-17 15:37:16 +01:00
wayneonway
ec81f538be netlink: route handling checks for SRC when it means DST
https://github.com/warmcat/libwebsockets/issues/2603
2022-05-17 15:37:16 +01:00
Andy Green
3d98e29518 raw: tls conns
Raw + tls needs a little extra handling during connect.
2022-05-17 15:34:30 +01:00
Andy Green
995a759184 h1: remove assert on unexpected POLLIN state just hangup 2022-05-17 15:34:30 +01:00
Andy Green
db5f574b03 nsc: fall back to internal headers when no stash 2022-05-17 15:34:30 +01:00
Andy Green
058f97e687 netlink: always delete route if it exists
https://github.com/warmcat/libwebsockets/issues/2567
2022-05-17 15:07:19 +01:00
Andy Green
fcde566fc6 cgi: gracefully handle missing wsi->http.cgi 2022-02-21 11:08:19 +00:00
Andy Green
027fe42cec h1: deal with WAITING_CONNECT in ops-h1
We don't normally see events on the wsi in this state, but it is possible
since warmcat.com lwsws asserted on it in WAITING_CONNECT.

Explicitly handle it so we don't blow up.
2022-02-21 11:08:12 +00:00
Andy Green
0033accb83 lejp-conf: provide matches for block start paths
Also valgrind shows we should zero down the lejp context to avoid problems
with the wildcard stack
2022-02-11 08:43:16 +00:00
Andy Green
ab7ce50174 http: proxy server: move C99 VLA to heap 2022-02-09 20:12:31 +00:00
Chunho Lee
a80fbeb820 ss: mqtt: add support for retained message 2022-02-07 09:37:34 +00:00
Sylvain Saunier
bb759fd983 route: fix nl groups and local ipv6 ads 2022-02-03 10:20:16 +00:00
Andy Green
939a512413 mbedtls: improve api detection
mbedtls cmake api detection was not able to work on esp-idf well.

Improve diagnostics and reaction if we ever see that again.
2022-02-01 14:09:19 +00:00
yogpstop
637ed905af http: lws_add_http_header_by_name: add colon if needed 2022-01-27 14:30:12 +00:00
Andy Green
a352b9bf20 http: access_log: fix nwsi check
h2 logging often lacked the IP as it checked the af on the sa46_peer of the
child stream when it meant to check the nwsi one.
2022-01-16 13:32:30 +00:00
Vitaliy Orazov
e529720fc1 http: proxying: allow for large headers
set the buffer size (rpath) for header processing during
 proxying equal to the value in max_http_header_data
2021-12-14 08:10:25 +00:00
DerKleinePunk
0bc5b58ee3 http: cookie_get
The loop check shouldn't care about bl any more, since we snipped bl from n
already.
2021-12-02 09:46:46 +00:00
Vitaliy Orazov
0dc0f92f29 http proxy: support PUT, PATCH and DELETE methods 2021-11-29 15:26:04 +00:00
Andy Green
d42a7900d6 ws: client: fail server link if masked 2021-11-22 15:42:14 +00:00
Chunho Lee
c182871358 mqtt: always init wildcard and shadow 2021-11-22 15:41:37 +00:00
Andy Green
eba4f8cfb8 http: remove stray debug log 2021-11-22 15:39:42 +00:00
Andy Green
bc83a57207 h2: post: do not try to bind origin for files 2021-11-18 08:06:32 +00:00
Andy Green
3e1a1a443d coverity: client_reset: no longer any way to get NULL *pwsi
Coverity belatedly noticed that client_reset no longer changes *pwsi
2021-11-08 11:08:45 +00:00
Andy Green
1db45d17df h2: coverity: check for OOM on dynamic table alloc
It can fail, we should check it.
2021-11-08 11:05:28 +00:00
Ron Frederick
7451ce5cfb server: SO_REUSEPORT: enable with LWS_MAX_SMP > 1
Either explicit option selection, or multiple SMP service threads, should
enable SO_REUSEPORT

https://github.com/warmcat/libwebsockets/issues/2470
2021-10-30 06:24:04 +01:00
Chunho Lee
b843c09dc2 mqtt: allow indicating username and password are not on heap
Fix minimal-mqtt-client and minimal-mqtt-client-multi from crashes
by allowing indicating username and password are not on heap.
2021-10-27 16:55:12 +01:00