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

4519 commits

Author SHA1 Message Date
Andy Green
e560d2c049 h2: stay a client if a client 2020-12-24 16:14:36 +00:00
Andy Green
81bd0f8e55 sai: OSX target 10.15 2020-12-24 16:14:36 +00:00
Andy Green
67c50d0585 sai: restrict individual build parallelism 2020-12-24 16:14:36 +00:00
Andy Green
50d949dda9 sai: freebsd: reduce parallel from 12 to 3 for OOM 2020-12-24 16:14:36 +00:00
Jed Lu
3c661ede9e ss: http: make sure we dont duplicate leading path slash if already present 2020-12-24 16:14:36 +00:00
Andy Green
19935e5861 minimal-h-s-tls: bind to default http-only 2020-12-24 16:14:36 +00:00
Andy Green
49b301b53b minimal: http-client-multi: set h2 or h1 via alpn 2020-12-24 16:14:36 +00:00
Andy Green
96eb1cd760 ctest: add valgrind to some tests if platform has it available 2020-12-24 16:14:36 +00:00
Andy Green
68afe5b492 ss: minimal example: testsfail
A minimal example aimed at various SS failure paths.
2020-12-24 16:14:36 +00:00
Andy Green
36de3d8300 ss: h2: dont report nwsi close
SS protocol doesn't want to hear about the nwsi closing after
any streams on the protocol closed.
2020-12-24 16:14:36 +00:00
Andy Green
cdbd50a2e6 dns-sort: reduce logging to info 2020-12-24 16:14:36 +00:00
Andy Green
3cd5492a15 client: reject mux same endpoint conn on h1 if no h1 alpn
With synthetic tests, we can have an h1 connection open to a server
and ask for an h2-specific connection to the same thing... lws will
bind it to the idle h1 connection since the endpoint and tls matches.

This also makes it check that the alpn filtering matches h1 before
allowing that.
2020-12-24 16:14:36 +00:00
Andy Green
828b5cae24 ss: h2: set alpn
In order to force h2, we need to specify the client acceptable alpn as h2
2020-12-24 16:14:36 +00:00
Andy Green
8312ff499e ss: clean up wsi when handling DESTROY_ME 2020-12-24 16:14:36 +00:00
Andy Green
e8420f31e8 ss: h1: also handle 429 same as 503 2020-12-24 16:14:36 +00:00
Andy Green
454adf55ef lws_ptr_diff_size_t
lws_ptr_diff() is a very handy helper reducing the pointer delta to an int
count of bytes... however many times we actually want a size_t count of bytes
since that's the type of the argument we're trying to feed.

Let's establish a variant that naturally issues size_t.
2020-12-24 16:14:24 +00:00
Andy Green
9b42fc6aae NetBSD: also need two-arg setpgid
Enable sai
2020-12-07 11:31:53 +00:00
Andy Green
1d8be99cff cmake: latest cmake shows dep warnings for scripts < 2.8.12 2020-12-06 19:44:54 +00:00
Andy Green
8b82560014 cmake: netbsd: no libdl 2020-12-06 19:39:35 +00:00
Andy Green
60b995b8ce esp32: update build arrangements 2020-12-06 19:06:11 +00:00
Andy Green
050d23f0be sai: mac m1 2020-12-06 19:06:07 +00:00
Andy Green
587f24f71d clean: remove h2 debug spew 2020-12-06 19:06:05 +00:00
Andy Green
962e9ee345 wip: ss c++ classes
C++ APIs wrapping SS client


These are intended to provide an experimental protocol-independent c++
api even more abstracted than secure streams, along the lines of
"wget -Omyfile https://example.com/thing"

WIP
2020-12-02 10:15:50 +00:00
Andy Green
224e155676 zip-fops: test-server: also install candide-uncompressed example 2020-12-01 17:29:00 +00:00
Andy Green
3952c2598d zip-fops: example: add concompressed mount too 2020-12-01 16:30:19 +00:00
Andy Green
2329dc6968 zip-fops: example: correct zipfile serving path 2020-12-01 15:38:20 +00:00
Andy Green
0ff5a1df75 ctest: sspc proxy minimal
CTest does not directly support daemon spawn as part of the test flow,
we have to specify it as a "fixture" dependency and then hack up daemonization
in a shellscript... this last part unfortunately limits its ability to run to
unix type platforms.

On those though, if the PROXY_API cmake option is enabled, the ctest flow will
spawn the proxy and run lws-minimal-secure-strems-client against it
2020-12-01 15:38:20 +00:00
Andy Green
a1d86d89fa async-dns: fix error path 2020-12-01 15:38:20 +00:00
Andy Green
06b39e3315 cmake: remove crufty event lib redefs 2020-12-01 15:38:20 +00:00
Andy Green
b3ddd3db17 libuv: context creation fails via destroy
When using a foreign libuv loop, context creation may fail after adding
handles to the foreign loop... if so, it can no longer deal with the
fatal error by unpicking the created context and returning NULL... it
has to brazen it out with a half-baked context that has already started
the destroy flow and allow the foreign loop to close out the handles
the usual way for libuv.

https://github.com/warmcat/libwebsockets/issues/2129
2020-12-01 15:38:20 +00:00
Andy Green
8f68bc1fc8 sai: sspc proxy minimal examples 2020-12-01 15:38:20 +00:00
Andy Green
d9d53395e2 windows: threadpool: add back threadpool processing hook for CANCELLED 2020-12-01 15:38:20 +00:00
Andy Green
5f3cb5ad77 ss: ss timeout also handle DISCONNECT_ME 2020-12-01 15:38:20 +00:00
Andy Green
1cf25e3052 doc: lws_add_http_header_by_name make it clear the trailing : is expected 2020-12-01 15:38:20 +00:00
Andy Green
02f414bbe2 sspc: log client tx not implementing destroy 2020-12-01 15:38:20 +00:00
Yichen Gu
76fd7319be sspc: double free + rx ret not checked
Change-Id: I81b67cbb28591a20842fc7d6e09b78375845aae4
2020-12-01 15:38:20 +00:00
Andy Green
43f9af2f55 cmake: windows: try to auto include LwsCheckRequirements 2020-12-01 15:38:20 +00:00
Andy Green
ba062ee9e3 eventlibs: add cwd and LD_LIBRARY_PATH to dirs
If not found in the cwd or the LIB_INSTALL path, then go through
the paths in LD_LIBRARY_PATH as well looking for the event lib
plugin
2020-12-01 15:38:20 +00:00
Andy Green
4343182002 logging: reduce serving logs 2020-12-01 15:38:20 +00:00
Andy Green
7d355912c3 h2: fix ignoring unknown frame payloads 2020-12-01 15:38:09 +00:00
Andy Green
10714c58e9 h2: ignore unknown frame types a bit earlier
Chrome has started being able to issue frame type 0x42, we drop the connection
before we realize we wanted to ignore it.

This explicitly ignores it a bit earlier.
2020-11-28 10:58:38 +00:00
Jed Lu
e815ad2920 ss: handle nonzero content-length set by metadata correctly 2020-11-28 10:58:38 +00:00
Andy Green
426623433a ss-srv: destroy accepted clients on ws close 2020-11-28 10:58:38 +00:00
Andy Green
b4af4bf025 docs: lwsac doxygen 2020-11-28 10:58:38 +00:00
Yucong Sun
a72e975613 mingw: libevent build fixes 2020-11-28 10:58:38 +00:00
Andy Green
acfd3491b9 http: REDIRECT_HTTP_TO_HTTPS apply the original path to redirect
Let's regenerate the path and urlargs part on the redirect, for the case we
are forcing clients to redirectto the same place but with tls


https://github.com/warmcat/libwebsockets/issues/2112
2020-11-28 10:58:38 +00:00
Andy Green
d1958ee2ea sspc: check for client handle use before CREATING
When ss is proxied, the handle CREATING state is deferred until the handle links up
to the proxy.  So user code should only start using it when it sees CREATING.  If it
tries to use it before then, we won'tget anywhere but we should make sure not to crash
on the NULL proxy link cwsi.
2020-11-28 10:58:38 +00:00
Andy Green
922b939521 h1only: fix assumption about h2 and add sai
Fix an assumption about h2 being around if h1 is that crept in.

Add a sai scenario to catch this kind of problem, only needs one
build since testing lws' own consistency... add WITH_MINIMAL_EXAMPLES
as well
2020-11-28 10:58:38 +00:00
Mykola Stryebkov
a03181301d smp: minimal client with several active connections 2020-11-28 10:58:38 +00:00
Andy Green
2bcae2b3b6 context: refactor destroy flow 2020-11-28 10:58:38 +00:00