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

613 commits

Author SHA1 Message Date
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
Andy Green
1a69afaf6e raw-file: clear POLLOUT before handling 2021-10-24 16:57:40 +01:00
Andy Green
55a7c6a0f4 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 05:33:56 +01:00
Yichen Gu
61c2e3291f mqtt: protect printing debug only vars 2021-10-13 15:55:23 +01:00
Felipe Gasper
7fb6a450e8 logs: migrate ws extension code to contextual logging 2021-10-13 11:11:52 +01:00
Felipe Gasper
b53a09f61c logs: migrate client-parser-ws.c to contextual logging 2021-10-13 11:11:50 +01:00
Felipe Gasper
fad2bdbeea Teach client-ws.c about log contexts. 2021-10-12 09:46:06 +01:00
Chunho Lee
bf5744ab07 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 11:22:21 +01:00
Chunho Lee
6decd5a7e7 ss-mqtt: Skip SUBSCRIBE when MQTT session is resumed 2021-10-07 11:22:08 +01:00
Andy Green
ee15b82b6e cmake: unbreak LWS_WITH_SYS_STATE disabled build 2021-10-05 07:40:17 +01:00
Andy Green
b6004e08c9 mqtt: allow indicating client_id is not on heap
Not sure why we don't leave any freeing to the caller, but since we don't
allow indicating that the provided client id should not be freed.
2021-10-05 07:09:47 +01:00
oaleshina
17199959aa h2: ping pong: separate payloads
https://github.com/warmcat/libwebsockets/pull/2413
2021-10-05 07:09:37 +01:00
Andy Green
27fac9dd86 warn: avoid one toolchain false positive 2021-09-09 15:27:41 +01:00
xionghui
365328c4d3 http server: allow serving files with special unicode path 2021-09-09 15:27:27 +01:00
Andy Green
3892a9d21c h2: bulk rx: deal with window
We don't always keep updating the rxflow window on bulk rx, and just run
down the initial.  This keeps us going with 64K in flight
2021-08-31 05:45:40 +01:00
Austen Stone
f6954e432c http: custom hdr: add custom name iterator 2021-08-31 05:45:40 +01:00
Andy Green
572e7e03e5 http: hdr: sync lws_hdr_total_length with lws_hdr_copy 2021-08-31 05:45:40 +01:00
Yichen Gu
b31c5d6ffe http: cookies: support cookie jar in and out 2021-08-21 17:44:40 +01:00
Andy Green
6953958fc3 http: redirect: make sure we keep wsi opaque 2021-08-19 10:01:53 +01:00
Gopi Rao
1348632d14 h2: plat: fix plat SETTINGS override
The FREERTOS plat has its own h2 SETTINGS, but although they are used, they
get overridden with the lws default SETTINGS during pt init.

Let's not do that if someone else has already touched the context set.
2021-08-19 05:31:15 +01:00
Andy Green
0043ea5d44 ws: check protocol before debug log 2021-08-19 05:31:15 +01:00
Andy Green
5b8a597c1d server: http-proxy: fix POST 2021-08-19 05:31:15 +01:00
Andy Green
a7e4724a5e http: date: use timegm 2021-08-13 05:25:00 +01:00
Andy Green
5f31ff8383 h2: data: frame header already parsed out 2021-08-09 17:31:16 +01:00
Andy Green
d18d7a3643 http: redir: to tls from none 2021-07-30 11:32:27 +01:00
Yucong Sun
e5944a7da2 h2: server: file serving chunk restricted to max frame size from SETTINGS 2021-07-23 04:22:06 +01:00
Andy Green
c11311ff5a ws: ext: close wsi rather than spin if unable to clear buflist
If there's ssl pending and stuff in the buflist, it was observed we can
spin if the buflist is not cleared due to wsi state.

Add a sanity check for the number of times we will try to deal with that
before dropping the conn.
2021-07-18 11:25:24 +01:00
Andy Green
4c4b2c5dcf libevent: use event_enable_debug_mode 2021-07-13 08:27:18 +01:00
Andy Green
46c84eec06 raw-proxy: fix role bind flag 2021-07-08 06:22:45 +01:00
Andy Green
ee510154a0 fi: wsi: fault to fake peer hangup after a delay range
Example usage, client

$ valgrind ./bin/lws-minimal-secure-streams-stress-client -c 4 --budget 40

proxy

$ valgrind ./lws-minimal-secure-streams-proxy --fault-injection "ss=mintest/wsi/timedclose(20%),ss=mintest/wsi/timedclose_ms(0..100)"
2021-07-04 10:29:54 +01:00
Andy Green
fabe78d222 Wextra
Add -Wextra (with -Wno-unused-parameter) to unix builds in addition to
-Wall -Werror.

This can successfully build everything in Sai without warnings / errors.
2021-07-04 10:29:54 +01:00
Andy Green
5432e8ae7b sspc: add concurrency stress
Add a way to perform sspc tests with increased concurrency and sequential
tests
2021-07-04 10:29:52 +01:00
Andy Green
a7edd16399 logs: more internal conversion to log_cx 2021-07-01 05:20:53 +01:00
Andy Green
5d8cf03221 logs: log contexts 2021-07-01 05:20:53 +01:00
Andy Green
8e76634ed3 logs: introduce log_cx 2021-07-01 05:20:53 +01:00
Chunho Lee
349cc1b635 mqtt: fix wrong packet id in some conditions 2021-07-01 05:11:25 +01:00
Andy Green
34afca321c netlink: hold in COLDPLUG until we actually have some routing table contents 2021-06-27 08:42:26 +01:00
David Jeffers
c90feba3f6 gcc: gcc8 only recognizes fallthu
Later gcc is more accepting, but there's at least one gcc8 toolchain that only likes
to hear "fallthru", or it will flag it
2021-06-24 17:32:57 +01:00
Andy Green
cf2dbdc6a0 vhost: create multiple listen sockets per AF
On some platforms AF_INET and AF_INET6 must be listened for on separate
sockets.  Adapt the vhost server creation code to use the new support for
multiple listen sockets per vhost to create up to two listen sockets for
AF_INET and AF_INET6.

It refactors how the decision about the AF is made and propagated so
there's only one place for it.
2021-06-22 16:25:50 +01:00