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

694 commits

Author SHA1 Message Date
Andy Green
ef4a85d0e1 ws: ext header is already delimited if present 2025-03-05 07:11:22 +00:00
Andy Green
a9b8fe7ebf ws: delimit ws upgrade protocol when exts available
https://github.com/warmcat/libwebsockets/issues/3151
2025-03-03 07:31:09 +00:00
Andy Green
fb6a7c8131 coverity 472861: http2: deal with zero length data without overflow 2025-01-22 08:43:45 +00:00
Andy Green
aff5bb43e4 coverity 472860: ops-h2: let coverity see all err enums covered
x
2025-01-22 08:43:45 +00:00
Andy Green
f835779a74 coverity 472863: cookies: length check order wrong 2025-01-22 08:43:45 +00:00
Andy Green
d568eccd4c 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:22:26 +00:00
Andy Green
4393edf1a5 esp-idf-update 2024-11-03 07:59:12 +00:00
stropee
e04a3cf132 http: pipeline: handle methods lacking COMPLETED_CLIENT_HTTP
Signed-off-by: stropee <simon@sirocha.fr>
2024-11-03 07:59:04 +00:00
stropee
ea00ad2076 http: pipeline: enable for more methods
Signed-off-by: stropee <simon@sirocha.fr>
2024-11-03 07:58:59 +00:00
Orgad Shaneh
8263a6814e clean: var unused when no logs 2024-11-02 09:37:27 +00:00
Andy Green
032adce8c3 minimal: add note about binding mount 2024-10-31 15:20:11 +00:00
Andy Green
9dbbd45170 lws_get_urlarg_by_name: drop candidates that wont fit in buf rather than bail
https://github.com/warmcat/libwebsockets/issues/3227
2024-09-28 06:03:06 +01:00
Andy Green
c60bff0991 ws: extensions: allow h2 headers
https://github.com/warmcat/libwebsockets/issues/3151
2024-09-26 06:13:05 +01:00
Andy Green
e975bae1e6 ws: increase sanity check for spins needed to consume buffer to 100
https://github.com/warmcat/libwebsockets/issues/3184
2024-09-25 08:52:53 +01:00
Andy Green
2a5c8913a8 centos7: remove obsolete workaround
Need for this seems to have gone away

https://github.com/warmcat/libwebsockets/issues/2729
2024-09-23 11:01:17 +01:00
zzblydia
fdde9119f7 client hs: fix segmentation fault
https://github.com/warmcat/libwebsockets/pull/3171
2024-06-24 09:08:31 +01:00
Andy Green
4abdfa810a client-http: use enum for failures correctly
https://github.com/warmcat/libwebsockets/issues/3159
2024-05-31 17:09:59 +01:00
Dmitry Potapov
3b0eb45518 http: server: _lws_vhost_init_server_af only needed once
If we already have vh_listen_sockfd ready, call _lws_vhost_init_server_af
only once, regardless of IPv6 support.
2024-05-12 05:11:54 +01:00
Dmitry Potapov
4eab8f5a19 http: windows: adapt dup() to use windows api 2024-05-12 05:10:22 +01:00
p-luke
e4be3317ee 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:11 +00:00
c-jimenez
c57c239368 basic-auth: allow NUL in password
https://github.com/warmcat/libwebsockets/issues/3092
2024-03-11 07:54:39 +00:00
Liu DongMiao
992f40c7a1 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:49:46 +00:00
Liu DongMiao
29c0b56582 raw: connect callback can be triggered twice 2024-03-07 09:49:21 +00:00
Liu Dongmiao
fe9a2b86ab ws: allow reserved bits and opcode
should close #3076
2024-03-01 08:15:08 +00:00
Andy Green
b71a6621b0 h2: file upload: avoid feeling too much POST
https://github.com/warmcat/libwebsockets/issues/3070
2024-02-17 12:34:14 +00:00
Andy Green
378ad62adf digest: only if we have tls lib to do hashing 2024-02-16 15:45:45 +00:00
Andy Green
1239a2b121 http-digest: coverity: dead code 2024-01-17 08:54:51 +00:00
Andy Green
837db622eb clean: avoid maybe-uninitialized
https://github.com/warmcat/libwebsockets/issues/3049
2024-01-16 07:15:30 +00:00
markmaker
43df4901ee vhost: server: Ignore a vhost port mismatch when using CONTEXT_PORT_NO_LISTEN_SERVER
https://github.com/warmcat/libwebsockets/issues/3044
2024-01-08 14:40:46 +00:00
Ogre Transporter
50ba61082d windows: clean quirks
https://github.com/warmcat/libwebsockets/issues/3039
2024-01-05 05:50:57 +00:00
Andy Green
3207da067e vhost: allow fd adoption 2024-01-04 11:35:01 +00:00
stropee
22808f049c http: fix auth digest 2023-12-27 06:34:09 +00:00
Andy Green
7efab5f905 h1: reset pipelined parsing 2023-12-27 06:34:03 +00:00
Andy Green
93ae4cb628 ipv6: avoid spinning on interface set
https://github.com/warmcat/libwebsockets/issues/3028
2023-12-14 05:58:15 +00:00
Andy Green
957503436e http: mounts: LWSMPRO_NO_MOUNT
Provide a way to apply exception mount urls that exist on top of a larger
mount, but provide an exception which enforces the url to not be serviced
by the mount code, but by whatever dynamic handler is in place.
2023-12-12 05:57:38 +00:00
Ilya Smelykh
fdfde2ce0b http: auth digest 2023-12-08 10:25:50 +00:00
Lonny Wong
8d4079884b pmd: revert #3014 and drain extensions before next ssl read 2023-11-24 05:51:46 +00:00
Andy Green
24c37d1ea1 h2: reply with selected extension 2023-11-23 09:45:12 +00:00
Lonny Wong
57d539ef51 pmd: fix buffer being reused while draining extensions 2023-11-23 09:45:12 +00:00
tjwalton
83eeb76d66 server: Always return result of _lws_vhost_init_server_af
Fixes https://github.com/warmcat/libwebsockets/issues/2702
2023-11-23 09:45:12 +00:00
Max van Kessel
3fa129172a dbus: prevent double free timeout event
SUL callback triggers a dbus timeout handle, handle removes the linked
list entry and free's the memory attached to the entry. Remove the code
where the the entry was removed by the timer callback, which triggered
a double free of the same linked list entry.
2023-11-23 09:45:12 +00:00
Edward Zhang
9202017c27 pmd: fix ws parser for non pmd packet with pmd ext enabled 2023-11-23 09:45:11 +00:00
Carsten Schuette
52597bf012 clean: gcc13 false positive uninitialized
https://github.com/warmcat/libwebsockets/issues/3004
2023-11-23 09:45:11 +00:00
Mark Butowski
7ef2065fdf netlink: fix errant route delete on NEWADDR
NEWADDR was errantly deleting route entities, specifically it happend
to delete IPv6 route entries causing a disconnect of all IPv6 clients.
NEWADDR can be issued on a DHCP lease renew, which does not change any
of the routes.

Code was also cleaned up a bit, and added some helpful logging.
2023-09-24 08:27:04 +01:00
wangyingdong
07778789f4 Introducing libwebsockets support for nuttx
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-09-21 13:08:16 +01:00
Philippe Coval
a6a7fa646e fix: l/r/h/http2.c: Fix spelling mistake
Fix spelling mistake it was found while packaging mosquito for debian:

I: mosquitto: spelling-error-in-binary Inital Initial [usr/sbin/mosquitto]
I: mosquitto: spelling-error-in-binary witholding withholding [usr/sbin/mosquitto]

Forwarded: https://github.com/warmcat/libwebsockets/pull/2927
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2023-09-21 13:08:11 +01:00
songbuhuang
2c981f7670 clean: unreachable cruft
Signed-off-by: songbuhuang <544824346@qq.com>
2022-09-18 08:17:25 +01:00
Andy Green
af64c7fc4f http proxy: fix host 2022-09-18 08:17:20 +01:00
qdztxc
173c84a595 ws: tell caller we closed wsi on handshake failure
https://github.com/warmcat/libwebsockets/issues/2681
2022-07-12 09:47:56 +01:00
Marco Gratzke
c28b390e77 spa: file upload fix 2022-07-04 14:23:02 +01:00