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

2670 commits

Author SHA1 Message Date
Andy Green
6677425272 minimal: kill stray symlink
https://github.com/warmcat/libwebsockets/issues/1344
2018-07-19 15:58:24 +08:00
Andy Green
97f4b6906b client: use lws_strdup for client_hostname_copy
https://github.com/warmcat/libwebsockets/issues/1343
2018-07-19 06:15:29 +08:00
Andy Green
0222cd25b0 lws_get_peer_write_allowance: cope with no role callback for it
https://github.com/warmcat/libwebsockets/issues/1339
2018-07-17 18:29:05 +08:00
Dmytro Ivanov
ff2b1eab36 tls:Implement client_ssl_ca_mem/client_ssl_ca_mem_len to load root CA certs from memory. 2018-07-17 18:25:53 +08:00
Andy Green
f85cc83de3 http: ETAG hits wrongly seen as serve fails on h2
nonzero return from lws_http_serve() can equally be because we
hit on an ETAG and finished the serve with only the headers.

Split the return so -1 is to assertively close the stream, 1
is we didn't serve anything (eg, not found) and 0 is continuing
asynchronously to serve.
2018-07-16 09:38:12 +08:00
Dmytro Ivanov
78aeb75221 Android: Fixing missing sockaddr_in definition. 2018-07-16 09:38:07 +08:00
chrisplusplus
2b9c69b55f Update protocol_lws_minimal_server_echo.c
This plugin will not compile as a plugin without changing
LWS_PLUGIN_PROTOCOL_MINIMAL_server_echo to
LWS_PLUGIN_PROTOCOL_MINIMAL_SERVER_ECHO
2018-07-11 15:31:22 +08:00
James Chicca
6648e01072 foreach_ll_safe 2018-07-11 15:17:58 +08:00
shinny-chengzhi
5740356d9a Fix I/O hang after received a large deflate frame
When a large deflate frame been received, WSAEnumNetworkEvents will indicate the socket is ready to read. And because the frame is compressed, it may not be consumed entirely(not all bytes ready to receive have been received), since WSAEnumNetworkEvents is edge triggered, and the socket read buffer never been drained, WSAEnumNetworkEvents will never indicate the socket is ready to read again. What here need is level trigger behavior, thus add additional recv with empty buffer to reset edge status.
2018-07-11 15:14:01 +08:00
張俊芝
d810379015 Fixes the binding error when SMP in tandem with a Unix domain socket 2018-07-08 20:53:49 +08:00
Andy Green
8ed4574d36 pmd: fix stray client-only
Fix wrong loglevels on some pmd debug stuff

Small cosmetic cleaning
2018-06-30 09:54:22 +08:00
Andy Green
5af32fe27d logging: stderr: reduce brightness of some ANSI loglevels 2018-06-30 09:54:22 +08:00
Rosen Penev
eb4cefceae openssl: Fix compile with 1.1.0 - deprecated APIs
These function have been deprecated. Keep compatibility with OpenSSL 1.0.2 as it is still supported.
2018-06-30 09:42:44 +08:00
Andy Green
855114e39a smp: context lock around vhost destroy 2018-06-27 09:18:24 +08:00
Andy Green
b58fb2dae3 lws_mutex_refcount
This creates a "pthread mutex with a reference count"
using gcc / clang atomic intrinsics + pthreads.

Both pt and context locks are moved to use this,
pt already had reference counting but it's new for
context.
2018-06-27 07:15:39 +08:00
Dominyk Tiller
8869a6ce1d libwebsockets.h: include new libuv header 2018-06-24 10:56:59 +08:00
Dominyk Tiller
d2943ff866 CMakeLists: add check for new libuv header 2018-06-24 10:54:17 +08:00
Andy Green
f2f96857d6 fd_cloexec: add and use lws_open wrapper and lws_plat_apply_FD_CLOEXEC() on cgi 2018-06-23 12:56:21 +08:00
Per Bothner
f7631b7a10 sockets: FD_CLOEXEC
If the user code forks, it inherits open copies of all
lws sockets, which conflict if lws later decides to
close them.
2018-06-23 05:44:36 +08:00
negativekelvin
bd9c1b715f Fixes to track updates in esp-idf 2018-06-20 16:41:28 +08:00
Andy Green
4d252d847b max_http_header_pool2: migrate context ah pool limit and count to unsigned int 2018-06-20 16:41:28 +08:00
Andy Green
7c6e3a8aeb http: urlarg capture fixes 2018-06-20 16:41:28 +08:00
Andy Green
e9d1782863 http: skip NULs between fragments 2018-06-20 16:41:28 +08:00
Silas Parker
b30af71ad8 client: off-by-one in redirect max length calc
https://libwebsockets.org/pipermail/libwebsockets/2018-June/003729.html
2018-06-20 16:41:28 +08:00
Andy Green
8b21b32ae5 doc-assets: update lws-overview 2018-06-20 16:41:28 +08:00
Andy Green
157ac030ab minimal-http-server-dynamic: add tls vhost as well 2018-06-20 16:41:27 +08:00
Andy Green
1eb4ac4b41 LWS_ILLEGAL_HTTP_CONTENT_LEN implies connection:close
If no content-length is coming, we just can't do
http/1.1 keep-alive.
2018-06-20 16:41:27 +08:00
Andy Green
d84aebd43a http: defer transaction completed if partial pending
This is only helpful for http/1... the real solution is cut up
sending large things.
2018-06-20 16:41:27 +08:00
Andy Green
df1d60fc1a plat: refactor private headers and split files
Also remove LWS_VISIBLE that are not necessary from plat apis
2018-06-20 16:41:27 +08:00
Andy Green
06680fc2a8 minimal-http-server-tls-80 2018-06-20 16:41:27 +08:00
Andy Green
410db9a28e minimal-http-server-multivhost: add --die-after-vhost option 2018-06-20 16:36:22 +08:00
Andy Green
ac3bd36c60 vhost_destroy: use vhost wsi reference counting to trigger destroy
This changes the vhost destroy flow to only hand off the listen
socket if another vhost sharing it, and mark the vhost as
being_destroyed.

Each tsi calls lws_check_deferred_free() once a second, if it sees
any vhost being_destroyed there, it closes all wsi on its tsi on
the same vhost, one time.

As the wsi on the vhost complete close (ie, after libuv async close
if on libuv event loop), they decrement a reference count for all
wsi open on the vhost.  The tsi who closes the last one then
completes the destroy flow for the vhost itself... it's random
which tsi completes the vhost destroy but since there are no
wsi left on the vhost, and it holds the context lock, nothing
can conflict.

The advantage of this is that owning tsi do the close for wsi
that are bound to the vhost under destruction, at a time when
they are guaranteed to be idle for service, and they do it with
both vhost and context locks owned, so no other service thread
can conflict for stuff protected by those either.

For the situation the user code may have allocations attached to
the vhost, this adds args to lws_vhost_destroy() to allow destroying
the user allocations just before the vhost is freed.
2018-06-18 09:11:46 +08:00
Andy Green
2935d7d32f scrub github links 2018-06-16 09:35:34 +08:00
Andy Green
d2bdb60a17 cgi: fix for https git server 2018-06-16 09:35:07 +08:00
Fabio Alessandrelli
d44fe7a280 Add fix for forward declaration in BSD 2018-06-08 05:47:41 +08:00
Andy Green
db6976992d sshd: make sure no aliases on last_alloc 2018-06-07 09:41:36 +08:00
Andy Green
44e5e1231b minimal client: add different paths to multi 2018-06-04 07:14:49 +08:00
Andy Green
6d72ef4768 client: pipelining needs ah reset at client transaction completed 2018-06-04 07:14:42 +08:00
Andy Green
95e31cb126 minimal ring: keep coverity happy for NULL pointer possibility 2018-06-03 17:09:27 +08:00
Ecionis
794c70cdc0 windows: fix microseconds time calculation
https://github.com/warmcat/libwebsockets/issues/1297
2018-06-02 06:01:47 +08:00
Alfred Sawaya
37f2297b2a fix memleak when role h1 failed to upgrade to websocket 2018-06-02 05:57:26 +08:00
emptyVoid
43bb340566 Fixed a couple of runtime issues introduced in commit 44efcd6. 2018-06-02 05:56:19 +08:00
Andy Green
44efcd6196 windows: remove unused event array 2018-05-26 19:41:06 +08:00
cfa15b4a73 rpm: add missing build-time dependencies 2018-05-26 09:20:24 +08:00
21ef5f60a4 rpm: do parallel compilation during rpm builds 2018-05-26 09:20:20 +08:00
dd52dbcd86 rpm: add missing test-apps to spec file 2018-05-26 09:20:08 +08:00
d2914a21e1 rpm: fix bogus date in changelog 2018-05-26 09:20:03 +08:00
40cd5c48c0 cmake: CPACK_SOURCE_IGNORE_FILES is a list of regular expressions 2018-05-26 09:19:54 +08:00
qmatt
7c12b88bc2 lwsl_debug: NOP if no _DEBUG 2018-05-26 09:07:31 +08:00
Andy Green
78e6c962f8 client: fix SOCKS5 compilation
https://github.com/warmcat/libwebsockets/issues/1292
2018-05-25 21:43:31 +08:00