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

134 commits

Author SHA1 Message Date
Andy Green
a3a4253ba9 dlo: lws_dlo_fops file_ops
This adds an optional lws VFS layer that exposes the named dlo object
registry.  So you can register a blob like a JPG named "my.jpg", and
access it on the vfs as, eg,  /dlofs/my.jpg (or file:///dlofs/my.jpg
if using the SS file:// support for VFS namespace).
2022-03-25 08:18:29 +00:00
Andy Green
a5aae049b2 v4.3.0 2021-10-05 07:40:17 +01:00
Andy Green
c34e24392e docs: update changelog and README 2021-08-31 05:45:40 +01:00
Andy Green
1367c11e1e v4.2.0 release 2021-04-15 17:44:02 +01:00
Andy Green
63e9699bda v4.1.0 2020-09-04 13:42:57 +01:00
Andy Green
e936c5e84d changelog: prepare for v4.1
Having an -rc1 this time
2020-07-15 16:18:00 +01:00
Andy Green
1289b0a0ef v4.0.0 2020-03-06 10:18:46 +00:00
Andy Green
26319663f7 license: switch LGPLv2.1+SLE parts to MIT 2019-08-14 10:44:38 +01:00
Andy Green
51cd925eff v3.2.0 2019-08-14 09:24:04 +01:00
Andy Green
eda102e397 jwe 2018-12-27 06:45:32 +08:00
Andy Green
9bed6d6fc6 clean: general whitespace cleanup 2018-11-23 08:47:56 +08:00
Andy Green
c027c3db28 docs: cleanups 2018-11-21 17:03:29 +08:00
Andy Green
d9f982a055 minimal examples: update for CSP best practices
1) update the logos to svg

2) add svg icon for strict security policy where used

3) define new vhost option flag to enforce sending CSP headers
   with the result code

4) add vhost option flag to minimal examples to
   enforce sending CSP where applicable

5) Go through all the affecting examples confirming they
   still work

6) add LWS_RECOMMENDED_MIN_HEADER_SPACE constant (currently
   2048) to clarify when we need a buffer to hold headers...
   with CSP the headers have become potentially a lot
   larger.
2018-11-21 17:03:29 +08:00
Andy Green
ac032544bf README.md: update in preparation for v3.1 2018-11-16 09:10:41 +08:00
Andy Green
502130d999 refactor: split out adoption and client apis to core
- split raw role into separate skt and file

 - remove all special knowledge from the adoption
   apis and migrate to core

 - remove all special knowledge from client_connect
   stuff, and have it discovered by iterating the
   role callbacks to let those choose how to bind;
   migrate to core

 - retire the old deprecated client apis pre-
   client_connect_info
2018-05-11 10:29:08 +08:00
Andy Green
1c08a96b47 prepare for new release 2018-05-05 06:03:15 +08:00
Andy Green
fcf5b2c25a v2.4.0 2017-10-17 13:21:12 +08:00
Andy Green
e6bd6296bd v2.3.0 2017-07-28 14:27:25 +08:00
Andy Green
6be573f2c9 v2.2.0 2017-03-08 14:15:01 +08:00
Andy Green
73557509bd v2.1.0
Bump soname to 9
2016-10-07 03:19:50 +08:00
Andy Green
fb8be0507e add lws_init_vhost_client_ssl api to allow client ssl use on a vhost
Also add lwsws "enable-client-ssl": "1" vhost option to match.

Client cert iclient ssl is not supported in lwsws, if someone wants it, it can be added.

Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-12 21:14:13 +08:00
Andy Green
f6585285cb protocol plugins set default
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-06 14:24:59 +08:00
Andy Green
f4767497d3 mimetypes add additional canned
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-06 08:02:57 +08:00
OndraCo
624b23df5e Changes to enable WIN CE support 2016-05-06 07:48:23 +08:00
Enno Boland
b6e2ad6b50 lib/server.c: fix ipv6 support 2016-05-06 07:47:54 +08:00
Enno Boland
7731a3e575 lib/ssl.c: fix libre- and boringssl 2016-05-06 07:46:26 +08:00
Andy Green
aef3dc4ad7 snip changelog back to 1.7
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-06 07:45:19 +08:00
Andy Green
5500643f3c v2.0.0
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-05 09:40:18 +08:00
Andy Green
c5376b141a extensions add api for user code option manipulation
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-08 09:45:49 +08:00
Andy Green
cd0c696a0d lwsws Libwebsockets Web Server
This makes a start on the LibWebSockets WebServer.

The app cmake build support and JSON config parsing are implemented and
the app can start, create the vhosts, listen and serve file:// mounts on
them.

Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-28 10:49:57 +08:00
Andy Green
c6fd360160 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable
https://github.com/warmcat/libwebsockets/issues/468

Adds lws_check_opt() to regularize multibit flag checking.

There's a new context creation flag LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT,
this is included automatically if you give any other SSL-related option flag.
If you give no SSL-related option flag, nor this one directly, then even
though SSL support may be compiled in, it is never initialized nor used for the
whole lifetime of the lws context.

Conversely in order to prepare the context to use SSL, even though, eg, you
are not listening on SSL but will use SSL client connections later, you can
give this flag explicitly to make sure SSL is initialized.

Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-23 09:22:11 +08:00
Andy Green
1a13885afd cgi env
Improve cgi support so it's capable of running cgit
2016-03-21 15:17:33 +08:00
Andy Green
1e5a9ad2dc proxy rewrite
If you enable -DLWS_WITH_HTTP_PROXY=1 at cmake, the test server has a
new URI path http://localhost:7681/proxytest If you visit here, a client
connection to http://example.com:80 is spawned, and the results piped on
to your original connection.

Also with LWS_WITH_HTTP_PROXY enabled at cmake, lws wants to link to an
additional library, "libhubbub".  This allows lws to do html rewriting on the
fly, adjusting proxied urls in a lightweight and fast way.
2016-03-20 11:59:53 +08:00
Andy Green
5c8906e931 client chunked transfer encoding
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-03-19 17:21:45 +08:00
Andy Green
0f9904fedf ssl option for auto redir to https
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-03-17 15:27:18 +08:00
Andy Green
4f5ebec3ef client ext hdr skip if no arg
https://github.com/warmcat/libwebsockets/issues/453#event-583227314

abnf does say has to be at least one arg

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-03-09 23:13:31 +08:00
Andy Green
fb5f33bb2f test server http proxy
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-03-02 18:57:41 +08:00
Andy Green
494418abac add explicit parent child wsi relationships
wsi can have a full tree relationship with each other using
linked lists.  closing the parent ensures the children are
closed first.

Convert cgi to use this instead of his cgi-specific sub-wsi
management.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-03-02 18:57:41 +08:00
Andy Green
a661ee5d53 client support http without ws
Server support for http[s] as well as ws[s] is implicit.
But until now client only supported ws[s].

This allows the user code to pass an explicit http method
like "GET" in the connect_info, disabling the ws upgrade logic.

Then you can also use lws client as http client, not just ws.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-29 18:41:36 +08:00
Andy Green
2d8d35a1be client accept connection request even if no free ah
It can join the free ah list and pick up client connect processing
later when the ah becomes available; this simplifies the code
doing the request since he won't have to deal with unexpected
failures / retries based on dynamic ah availability.

To do this though we have to handle that the connect_info members
may not have scope that lets them still exist after we return from
the first connect call, we stash them in a malloc'd buffer so the
connect processing can have them much later even so.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-29 14:19:16 +08:00
Andy Green
442e1c850d windows listen for pollhup
After Ondraco

https://github.com/warmcat/libwebsockets/issues/441

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-29 10:34:58 +08:00
Andy Green
83af28a747 ah move more_rx_waiting to wsi scope
Originally this was alright in wsi->u.hdr, because ah implied header
processing.  But since we allowed ah to be held across http
keep-alive transactions if we saw we had more header data, it means
we were trying to read this union member out of scope after it had
transitioned.

Moving the more_rx_waiting member to be a 1-bit bifield in the wsi
solves it and lets us check the state any time later at http
transaction completion.

https://github.com/warmcat/libwebsockets/issues/441

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-29 10:34:58 +08:00
Andy Green
4ba798dd7d close wsi must do detatch ah flow even if no ah
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 21:50:49 +08:00
Andy Green
d61bed3ce6 logging timestamp creation expose as api
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 15:01:55 +08:00
Andy Green
6a8099b071 cgi
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 09:45:17 +08:00
Andy Green
dbfbbb41b1 user code must explicitly complete http transaction
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 09:45:17 +08:00
Andy Green
5c0bcf49a8 defeat POLLOUT if socket in shutdown wait
After andrejs.hanins@ubnt.com

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 09:45:17 +08:00
Andy Green
51d9afadd6 adopt variant with preamble rx
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 09:45:17 +08:00
Andy Green
26d4249a3f ws union member must have actual struct at start not pointer
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-25 09:45:17 +08:00
Andy Green
0ad1a6e5bf test server add lws_status
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-21 11:09:40 +08:00