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

4250 commits

Author SHA1 Message Date
Dmitry Potapov
17bd1d0787 vhost: remove from defer binding on destroy
If a vhost is removed, it should remove references to it from the
defer binding list to avoid dangling pointers, which can crash the
application.
2022-08-17 08:59:18 +01:00
Andy Green
599adff99d sort-dns: fix scope comparison
https://github.com/warmcat/libwebsockets/issues/2537
2022-01-17 03:57:06 +00:00
Kenneth Mastro
43a1e83394 wolfssl: adapt SNI for recent changes
It seems WOLFSSL_SNI_HOST_NAME is an enum in later wolfssl, use
the wolfssl define HAVE_SNI as well
2021-10-06 06:28:12 +01:00
Andy Green
b3676e8525 ss: mass update LE root to isrg part 2 2021-10-02 06:01:32 +01:00
Andy Green
41dae8552f ss: mass update LE root to ISRG X1 2021-10-01 20:36:53 +01:00
Andy Green
0111d95d6b cmake: unbreak LWS_WITH_SYS_STATE disabled build 2021-09-27 06:37:25 +01:00
=?UTF-8?q?M=C3=A4rt=20Laak?=
1873ff6168 windows: fix _lws_plat_file_seek_cur to update pos in fd
* needed to make fops_zip to work in windows
2021-09-22 11:41:57 +01:00
Yucong Sun
457ec95d0c asyncdns: provide correct length with CCE 2021-09-18 03:59:51 +01:00
Andy Green
bd8f32d1f4 libevent: use event_enable_debug_mode 2021-09-17 04:21:16 +01:00
Andy Green
b5ae1e3b5a conmon: async-dns: off-by-one 2021-09-14 05:59:16 +01:00
Andy Green
e502a5fb44 ss-h1: reset message state for repeated use
This lets one "opportunistic" mode http policy SS be able to be used
multiple times.
2021-09-14 05:31:29 +01:00
oaleshina
c6cd4150c1 h2: ping pong: separate payloads 2021-09-13 17:31:02 +01:00
Andy Green
4dedd6f583 h2: make has_buffered_out check nwsi 2021-09-13 17:30:32 +01:00
Biswapriyo Nath
d1ce42e72c Subject: [PATCH] cmake: Install pkgconfig files in mingw 2021-09-09 17:05:23 +01:00
Andy Green
c52f909961 warn: avoid one toolchain false positive 2021-09-09 17:03:40 +01:00
xionghui
ff0e9db12f http server: allow serving files with special unicode path 2021-09-09 17:02:56 +01:00
Andy Green
2a6dc12464 cancel pipe: make sure we closed it on destroy with no EVENTFD case 2021-09-08 11:38:34 +01:00
Andy Green
ec242e9fe7 wolfssl-gencrypto-fixes-1 2021-09-08 10:47:29 +01:00
Andy Green
30eb20aa6b wolfssl: gencrypto fixes 2021-09-07 20:33:30 +01:00
Andy Green
5201e6e2bb wolfssl: update gencrypto 2021-09-07 19:55:51 +01:00
Andy Green
8d605f0649 ss: sigv4: disable ctest until new auth available 2021-08-28 07:39:20 +01:00
Andy Green
b0cdc05b6b h1: remove lwsl_wsi_err 2021-08-28 07:38:27 +01:00
Andy Green
fd4667f508 esp32c3
Add
2021-08-28 07:24:14 +01:00
Andy Green
279fd21e73 esp-idf: update againt 2021-08-06 head 2021-08-28 07:24:00 +01:00
Andy Green
9c20d32d33 validity: take context and pt lock before close 2021-08-27 13:13:41 +01:00
Andy Green
a85b70bfe6 http: hdr: sync lws_hdr_total_length with lws_hdr_copy 2021-08-27 05:51:12 +01:00
Andy Green
15a078c2cc windows: plat: only build client ctx init if WITH_TLS
https://github.com/warmcat/libwebsockets/issues/2385
2021-08-17 06:45:14 +01:00
Andy Green
40db9f9f19 server: http-proxy: fix POST 2021-08-14 05:01:20 +01:00
Andy Green
a938f943fc lws_struct: add CHILD_PTR setting 2021-08-13 05:52:16 +01:00
Yichen Gu
d90cd7be6d conmon: pass userobj to ss rx not handle 2021-08-13 05:51:37 +01:00
Andy Green
750f0a60e6 smd: avoid recursive lock when unregistering during delivery 2021-08-13 05:51:17 +01:00
Jed Lu
82e2e6cb7f ss: unpick failed create using destroy
The late_bail discrete unpick flow is missing some pieces compared
to lws_ss_destroy.  Unify the creation fail flow to also use
lws_ss_destroy so everything in one place.

Make lws_ss_destroy() not issue any states if the creation flow
didn't get as far as issuing CREATING.
2021-08-13 05:49:53 +01:00
Andy Green
21697b3210 ss: handle DESTROY_ME from inside ss creation
Normally when doing a Client Connection Error handling,
we can action any ss relationship straight away since
we are in a wsi callback without any ss-aware parents
in the call stack.

But in the specific case we're doing the initial onward
wsi connection part on behalf of a ss, in fact the call
stack does have earlier  parents holding references on
the related ss.

For example

  secstream_h1 (ss-h1.c:470)                          CCE
  lws_inform_client_conn_fail (close.c:319)           fails early
  lws_client_connect_2_dnsreq (connect2.c:349)
  lws_http_client_connect_via_info2 (connect.c:71)
  lws_header_table_attach (parsers.c:291)
  rops_client_bind_h1 (ops-h1.c:1001)
  lws_client_connect_via_info (connect.c:429)         start onward connect
  _lws_ss_client_connect (secure-streams.c:859)
  _lws_ss_request_tx (secure-streams.c:1577)
  lws_ss_request_tx (secure-streams.c:1515)           request tx
  ss_cpd_state (captive-portal-detect.c:50)
  lws_ss_event_helper (secure-streams.c:408)
  lws_ss_create (secure-streams.c:1256)                SS Create

Under these conditions, we can't action the DESTROY_ME that
is coming when the CCE exhausts the retries.

This patch adds a flag that is set during the SS's onward wsi
connection attempt and causes it to stash rather than action
the result code.

The result code is brought out from the stash when we return to
_lws_ss_client_connect level, and passed up in the SS flow until
it is actioned, cleanly aborting the ss create.
2021-08-13 05:47:00 +01:00
Andy Green
afce869758 http: date: use timegm 2021-08-13 05:46:05 +01:00
Andy Green
2ea2c37f9d h2: data: frame header already parsed out 2021-08-13 05:45:51 +01:00
Andy Green
e35029a749 types: handle ssize_t is int 2021-08-13 05:45:12 +01:00
Yichen Gu
5624659d37 conmon: only build if WITH_CONMON 2021-08-13 05:44:59 +01:00
Andy Green
03482d4c01 seq: fix 2021-08-13 05:42:10 +01:00
Andy Green
1de1aafca5 h2-fix-fileserving-2 2021-07-23 04:24:31 +01:00
Yucong Sun
a82219b0fc h2: server: fix file serving chunk restricted to max frame size from SETTINGS
previous fix was buggy and result in sending incomplete files.
2021-07-22 08:25:37 +01:00
Hassan Sahibzada
d2b87efb0a b64: add downcasts for gcc 4.4
gcc 4.4 complains with the following:
warning: conversion to 'char' from 'int' may alter its value

After the explicit cast the warning is gone.
2021-07-22 05:01:52 +01:00
Yucong Sun
1f99c206ab h2: server: file serving chunk restricted to max frame size from SETTINGS 2021-07-20 10:31:07 +01:00
Yucong Sun
d1db1d7b3f windows: tls: make sure we are telling correct errno 2021-07-20 10:30:59 +01:00
Yucong Sun
30e97fc08f cmake: tls: check correct api for availability 2021-07-20 10:30:59 +01:00
Andy Green
6435bfe309 iface: score binds 2021-07-20 10:30:58 +01:00
Andy Green
8a580b59b2 v4.2.1 2021-07-13 07:22:16 +01:00
Andy Green
e90f005a10 vhost: listen: protect listen port transfer between
...vhosts from vh destroy on zero refcount

https://github.com/warmcat/libwebsockets/issues/2343
2021-07-12 09:29:23 +01:00
Andy Green
041baf93cf mbedtls: sessions: clean session on bail path 2021-07-10 08:28:30 +01:00
Andy Green
4038a7d4b3 windows: align plat insert socket POLLIN handling to linux
This is needed for, eg, libuv
2021-07-10 08:28:21 +01:00
Andy Green
a310e16f8f socks5: cast for mingw3 nonposix recv args 2021-07-10 08:28:06 +01:00