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

2480 commits

Author SHA1 Message Date
Andy Green
b04708178a minimal: http-server-tls 2018-04-06 10:38:03 +08:00
Andy Green
5ecec970b2 minimal: dynamic http server 2018-04-06 10:38:03 +08:00
Andy Green
2519ac9ced coverity 188316: supposed deadcode 2018-04-06 10:38:03 +08:00
Andy Green
5fe9335b36 coverity 188416: possibility of NULL iface 2018-04-06 10:38:03 +08:00
Andy Green
0b65112ec4 coverity 188317: more fiddling around NO_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
5acbb04b51 unixskt: add test server support and cleanup inode on exit 2018-04-06 10:38:03 +08:00
Andy Green
422cbf24bd align private LWS_NO_EXTENSIONS to be same as public LWS_WITHOUT_EXTENSIONS
This is just an internal mass change of LWS_NO_EXTENSIONS to
LWS_WITHOUT_EXTENSIONS to match the public name and eliminate
all instances of LWS_NO_EXTENSIONS.
2018-04-06 10:38:03 +08:00
Andy Green
80e3e723e3 coverity 188326: hide supposed dead code from coverity with NO_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
95f8328ffc coverity 188320: hide supposed dead code from coverity with NO_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
e157fcfe37 coverity 188316: hide supposed dead code from coverity with NO_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
b0b10001fe coverity 188318: try to hide fake unused var from coverity 2018-04-06 10:38:03 +08:00
Andy Green
396b42ac6d coverity 188310: mirror plugin: when reach max mirror instances release lock before disconnect 2018-04-06 10:38:03 +08:00
Andy Green
b9a3b808fb coverity 188319: hide logically deaf code from coverity when WITHOUT_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
313cbb5350 coverity 188323: hide logically deaf code from coverity when WITHOUT_EXTENSIONS 2018-04-06 10:38:03 +08:00
Andy Green
d237ac1b95 coverity 188312: hide logically deaf code from coverity when WITHOUT_EXTENSIONS
There's nothing wrong with this but coverity chokes on it.

Also 188317 "solved" by this.
2018-04-06 10:38:03 +08:00
Andy Green
775f7bce09 coverity 188313: client: avoid possibility of strlen on NULL cce 2018-04-06 10:38:03 +08:00
Andy Green
bfc8a5cb1b coverity 188325: client: require at least once vhost 2018-04-06 10:38:03 +08:00
Andy Green
5a8fca6f79 coverity 188322: confirm wsi->protocol non-NULL before CONNECTION_ERROR 2018-04-06 10:38:03 +08:00
Andy Green
da38a17a31 coverity 188321: reject wsi with NULL vhost earlier 2018-04-06 10:38:03 +08:00
Andy Green
ea8c44d799 coverity 188315: reject wsi with NULL vhost earlier 2018-04-06 10:38:03 +08:00
Andy Green
613ae7921a coverity 188314: reject wsi with NULL vhost earlier 2018-04-06 10:38:03 +08:00
Andy Green
3775ac9d2e coverity 169270: client: handle NULL protocol 2018-04-06 10:38:03 +08:00
Andy Green
0e8b3fed12 coverity 188324: dead code when no extensions 2018-04-06 10:38:03 +08:00
Andy Green
f63f4e56aa lwsws: change the example to not bind to lo
https://github.com/warmcat/libwebsockets/issues/1211
2018-04-06 10:38:03 +08:00
Andy Green
e4a3e8c4d4 LWS_WITH_MINIMAL_EXAMPLES: default-off build all minimal samples after lws for QA
This adds an lws cmake option that builds all the minimal examples as part of lws,
it's useful for QA.

It adds a macro to examples that depend on a particular lws configuration to understand
they should just null out their project definition in builds where the lws configuration
requirement is not met, and we are building as part of lws.

It also adapts all the example library additions to select the just-built-but-not-yet-installed
library in the case it is built as part of lws.  If built standalone, it now uses the cmake
platform-abstracted way to add the library requirement too.
2018-04-06 10:38:03 +08:00
Andy Green
876878a2af minimal: ws-client-tx and change dir names to match project name 2018-04-06 10:38:03 +08:00
Andy Green
49a694bd1e minimal: add helpers and adapt all users 2018-04-06 10:38:03 +08:00
Andy Green
b8fb8c5b15 minimal: multivhost + refactor 2018-04-06 10:38:03 +08:00
Andy Green
081c9f7678 minimal-http-server-libuv 2018-04-06 10:38:02 +08:00
Andy Green
db8cbb3b61 minimal-ws-broker 2018-04-06 10:38:02 +08:00
Andy Green
6232f5a2b7 minimal: refactor directories and add README.md 2018-04-06 10:38:02 +08:00
Andy Green
9db35aa1bf minimal-ws-proxy 2018-04-06 10:38:02 +08:00
Andy Green
a91ed1fa4c client: CONNECTION_ERROR: target at local protocol if possible
Until now LWS_CALLBACK_CLIENT_CONNECTION_ERROR handling could only
take place on protocols[0].

This patch changes LWS_CALLBACK_CLIENT_CONNECTION_ERROR to be sent
to the protocol the client connection was bound to... if nothing
better that is still protocols[0], but if you created the client
connection using info.local_protocol_name, it will now be sent to
the bound protocol handler instead.
2018-04-06 10:38:02 +08:00
Andy Green
3ed755e52d client: add local_protocol_name binding to info
In the case you are creating a client connection, there may be
no relationship between the ws protocol you want to bind to at
the server, and the local protocol name you want the wsi to
bind to at the client.

This introduces a new client info struct member .local_protocol_name,
if it is NULL then all is as before, otherwise it binds the client
wsi to the named protocol early in the process, and .protocol is used
for the negotiation with the ws server.

This allows you to bind client wsi to local protocol handlers that
don't share the name of the ws protocol the connection will try
to negotiate.
2018-04-06 10:38:02 +08:00
Andy Green
2b932c500f LWS_CALLBACK_CLIENT_CLOSED: split out client and server CLOSE callback
Until now LWS_CALLBACK_CLOSED has served the same for
client and server connections.  This introduces a new
LWS_CALLBACK_CLIENT_CLOSE which is sent on established
ws client connections, insread of LWS_CALLBACK_CLOSED.

LWS_CALLBACK_CLOSED continues to be sent when server
ws connections close.
2018-04-06 10:38:02 +08:00
Andy Green
302f8fad82 h2 ws: fixes against chrome 2018-04-06 10:38:02 +08:00
Andy Green
0e39e7f5c6 LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT: protect against zero length packet causing spin when deciding if tls or not tls
https://github.com/warmcat/libwebsockets/pull/1206
2018-04-06 10:38:02 +08:00
Peter Pentchev
1b5d772c4a Subject: echo client: Fix an off-by-one error in --times handling 2018-04-06 10:38:02 +08:00
Peter Pentchev
2c93b25c73 Subject: echo: exit if --times is specified 2018-04-06 10:38:02 +08:00
Andy Green
6055411928 minimal-ws-client 2018-04-06 10:38:02 +08:00
Andy Green
7ad8332838 minimal-ws-server-threads 2018-04-06 10:38:02 +08:00
Andy Green
61376bd734 minimal: updates 2018-04-06 10:38:02 +08:00
Andy Green
aae2c24678 lws_snprintf 2018-03-12 09:28:42 +08:00
Andy Green
5fc2598eac smp: force cancel on pt that was assigned new wsi 2018-03-11 18:07:16 +08:00
Andy Green
ad5dbda120 access log: only produce when vh log file set 2018-03-11 18:07:16 +08:00
Andy Green
862ab64d62 vhost: handle creation failure without unbalanced call of PROTOCOL_DESTROY 2018-03-11 18:07:16 +08:00
Andy Green
dc15a77dfa openssl: avoid warning on versions with ECDH header 2018-03-11 18:07:16 +08:00
Andy Green
cb70b6e633 win32: remove snprintf mangling
Everything in lws outside esp32 was changed to use lws_snprintf() a while ago.

This fixes a couple of stragglers and removes the preprocessor mangling.
2018-03-09 08:49:59 +08:00
Andy Green
7f830195d6 docs: add note on lws_http_client_http_response about when to call it
https://github.com/warmcat/libwebsockets/issues/1202
2018-03-09 08:38:48 +08:00
Joe Littlejohn
e333d1a751 Add 'HS: ws upgrade unauthorized' on receiving 401
In the case that the connection cannot be established because the caller
is unauthorized, it's likely they have to do something to gain
authorization before retrying. This change introduces a new message that
can be checked for to understand more about why the connection has
failed to establish.

Closes #1200
2018-03-08 09:02:53 +08:00