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
Paul Shark
8fe3950acd http: server: correct plugin name in error 2022-06-14 07:37:11 +01:00
Andy Green
281ed171a3 dbus: check cx and vh locks via dbus_ctx 2022-06-14 07:36:51 +01:00
Richard Shi
5d56f7651f http: compression: fix selection
https://github.com/warmcat/libwebsockets/issues/2633
2022-05-04 08:43:26 +01:00
Chunho Lee
93d66b8301 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-04 08:42:43 +01:00
Chunho Lee
81e6c69481 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-04-11 09:31:06 +01:00
Chunho Lee
4975000aa2 mqtt: fix wrong awsiot field set on SUBSCRIBE 2022-04-11 09:30:49 +01:00
Orefkov
6e3221cd1a h2: access log: POST: prepare log
https://github.com/warmcat/libwebsockets/issues/2608
2022-04-11 08:33:29 +01:00
Andy Green
615a08b216 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-04-11 06:53:47 +01:00
wayneonway
61880e15ff netlink: route handling checks for SRC when it means DST
https://github.com/warmcat/libwebsockets/issues/2603
2022-04-10 06:56:12 +01:00
Andy Green
b0041b32e6 raw: tls conns
Raw + tls needs a little extra handling during connect.
2022-04-10 06:56:12 +01:00
Andy Green
2355b30fe4 h1: remove assert on unexpected POLLIN state just hangup 2022-03-25 08:18:30 +00:00
Andy Green
f8132e23dc nsc: fall back to internal headers when no stash 2022-03-25 08:18:29 +00:00
Andy Green
67931757f8 alloc: compressed backtrace instrumentation support
This adds apis that enable usage of compressed backtraces in heap
instrumentation.

A decompressor tool is also provided that emits a textual
call stack suitable for use with addr2line.
2022-03-15 10:28:09 +00:00
Andy Green
9011f913d5 netlink: always delete route if it exists
https://github.com/warmcat/libwebsockets/issues/2567
2022-03-15 10:28:09 +00:00
Andy Green
2de67dd0ae file_ops: vfs: support prefix matches and use of bound ops members
VFS needs some small updates... pass in the bound fops as well as the
context fops to the member callbacks.  ZIP_FOPS only cared about doing
operations on the platform / context vfs to walk the ZIP file, but other
uses are valid where we are doing operation inside the bound VFS itself.

Also, stash a cx pointer into file ops struct for convenience.
2022-03-15 10:28:09 +00:00
Andy Green
6829dba9a1 http: server: mounts: dont assume Basic Auth if no FILE_OPS 2022-03-15 10:28:09 +00:00
Andy Green
445651b2c6 cgi: gracefully handle missing wsi->http.cgi 2022-03-15 10:28:09 +00:00
Andy Green
717272d65d 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-03-15 10:28:09 +00:00
Andy Green
32698a2f4b 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-03-15 10:28:09 +00:00
Andy Green
8cc4c1713d http: proxy server: move C99 VLA to heap 2022-03-15 10:28:09 +00:00
Chunho Lee
3af7a16531 ss: mqtt: add support for retained message 2022-03-15 10:28:09 +00:00
Andy Green
4bf39f55d4 h2: improve logging for zero length DATA with EOS 2022-03-15 10:28:09 +00:00
Sylvain Saunier
84956d280a route: fix nl groups and local ipv6 ads 2022-03-15 10:28:09 +00:00
Andy Green
0ca97586d6 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 11:09:48 +00:00
yogpstop
2148becb3a http: lws_add_http_header_by_name: add colon if needed 2022-01-27 13:08:35 +00:00
Andy Green
8dc438ce2c 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 10:48:16 +00:00
Vitaliy Orazov
05997f4503 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-13 19:02:56 +00:00
Joerg Wendel
fe8170dcdc http: server: added no-cache handling to mounts 2021-12-13 19:02:56 +00:00
DerKleinePunk
e88a1b1b32 http: cookie_get
The loop check shouldn't care about bl any more, since we snipped bl from n
already.
2021-12-02 09:21:27 +00:00
Vitaliy Orazov
5747203406 http proxy: support PUT, PATCH and DELETE methods 2021-11-29 15:18:16 +00:00
Andy Green
ac5bb1c47f h2: post: do not try to bind origin for files 2021-11-17 14:50:05 +00:00
Andy Green
d080ab3585 ws: client: fail server link if masked 2021-11-17 10:14:43 +00:00
Chunho Lee
afe61d3828 mqtt: always init wildcard and shadow 2021-11-17 06:53:10 +00:00
Ilya Smelykh
d425691d9f client: flag defeating default cache-control headers added 2021-11-11 16:55:20 +00:00
Andy Green
3ede7bae26 http: remove stray debug log 2021-11-11 11:52:48 +00:00
Andy Green
81b481ef2f h2: coverity: check for OOM on dynamic table alloc
It can fail, we should check it.
2021-11-09 07:45:58 +00:00
Andy Green
c19dc963c9 cgi: issue CGI_TERMINATED also on reap
We also need to report CGI_TERMINATED when reaping children that closed by
themselves.  Keep an extra copy of the pid outside of the lws_spawn object
so it's still around by then.
2021-11-07 07:04:09 +00:00
Andy Green
095798d5d9 sshd: plugin: work with _BUILTIN
The sshd example has gotten crufted a few different ways.

Adapt the test-sshd protocol and callbacks to not collide with the plugin
ssh-demo exports, for BUILTIN case.

Do not build a static copy of ssh-base for test-sshd if PLUGINS_BUILTIN is
going to provide it via lws import.

Add pvo for ssh-base to enable it on to the test-sshd vhost.

Banner staging in buf[] shared some of source and dest when it was copied
in, move it up a bit to avoid this.

Add note about rsa key disable workaround on Fedora.

test-sshd uses CGI (and requires it enabled to build) because it predates
lws_spawn... lws cgi was migrated to lws_spawn, really the test=sshd needs
rewriting to use lws_spawn directly instead of cgi.
2021-11-07 07:04:09 +00:00
Ron Frederick
b5b7e793d4 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:19:37 +01:00
Andy Green
0993543ac8 adopt: improve wsi tags for listen
async-dns has to keep a listener on udp:53, but its tag doesn't really give
a clue what it is

[1534033|wsisrv|0|adopted]

this patch improves it and moves the decision about putting the server wsi
in SERVER or MUX group to the caller instead of guessing from the desc
name.

[1549684|wsisrv|0|system|asyncdns]
2021-10-29 15:41:52 +01:00
Chunho Lee
8e4336838a 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:52:38 +01:00
Andy Green
99f7e572ca raw-file: clear POLLOUT before handling 2021-10-24 16:48:03 +01:00
Andy Green
66afd3da78 coverity: client_reset: no longer any way to get NULL *pwsi
Coverity belatedly noticed that client_reset no longer changes *pwsi
2021-10-17 12:03:07 +01:00
Andy Green
28e5d41d9e http: sse: check POLLIN during DOING_TRANSACTION
When the client goes away, on some platforms all we get is POLLIN revent
stuck on... we have to read it to find out a zero length result and
understand it's gone.

Add SSE mode's DOING_TRANSACTION to the list of states we will read for.
2021-10-16 08:23:21 +01:00
Orefkov Aleksander
abef9ba252 http: spa: fetch any params
Added the ability to get additional form parameters with unknown names in the form parameters parser lws_spa. The example of using the form parameters parser has been updated. Fixed bug of double freeing memory in the example.
2021-10-15 08:47:52 +01:00
Yichen Gu
c3515cd6d9 mqtt: protect printing debug only vars 2021-10-13 15:56:22 +01:00
Felipe Gasper
a2ff2ba4eb logs: migrate ws extension code to contextual logging 2021-10-13 11:10:52 +01:00
Felipe Gasper
5a9ede36db logs: migrate client-parser-ws.c to contextual logging 2021-10-13 09:53:14 +01:00
Felipe Gasper
f9d9cb3bb7 Teach client-ws.c about log contexts. 2021-10-12 07:33:19 +01:00
Chunho Lee
f440a67ec8 ss-mqtt: Add support for Birth message
This provides Birth message on SS policy. The Birth message is
a message published just after the MQTT connection has been
established.
2021-10-07 10:59:08 +01:00