Commit graph

2159 commits

Author SHA1 Message Date
Andy Green
4578036b53 ext: use arguments and reply with them 2017-03-07 10:08:03 +08:00
Andy Green
b6e0c89750 coverity 177409: dont bother assigning ignored second SSL_shutdown return value
No security impact
2017-03-06 14:46:06 +08:00
Andy Green
688b819112 coverity 177410: check seek return value inside fops-zip
Truncated or corrupted zip on server side would read garbage instead of fail.
2017-03-06 14:46:05 +08:00
Andy Green
21d83b44ea test-client: only take data from LWS_CALLBACK_RECEIVE_CLIENT_HTTP 2017-03-06 14:46:03 +08:00
Andy Green
19cc7acb24 fops-zip 2017-03-05 15:32:55 +08:00
Andy Green
2f4dfa4ea7 rx flow: handle child state change during parent cb 2017-03-05 15:32:47 +08:00
Andy Green
753f1d642c junzip: style and migrate header into private-libwebsockets.h
Also introduce CMake LWS_WITH_ZIP_FOPS defaulting to ON that builds junzip.c and
make sure this is exported in lws_config.h (included by libwebsockets.h)

Improve lws handling of stdint.h import or simulate it.
2017-03-03 09:19:14 +08:00
Andy Green
cb35969fce junzip: import from DomTerm 912add15f3d0aec
From https://github.com/PerBothner/DomTerm.git
2017-03-03 08:44:04 +08:00
Andy Green
04054b4072 ev: fix build 2017-03-03 08:18:16 +08:00
Per Bothner
60f4569bb8 adopt: allow binding to parent at same time
- if protocol set, allocate own user_space

   If the child wsi wants the parent wsi user_space, it can use

       lws_wsi_user(lws_get_parent(child_wsi))

 - raw file close processing handles parent-child relationship
2017-03-03 07:36:08 +08:00
Michael Behrns-Miller [case-ubuntu]
2495afa604 Subject: Buffer index protection in the case where client does not
receive content length from HTTP server
2017-03-03 05:41:39 +08:00
Whisperbyte
faf260ccfa docs: mac: add info from github 2017-03-01 17:57:38 +08:00
Andy Green
1ada132932 fops: allow setting from context creation and introduce lws_select_fops_by_vfs_path
1) There's now a .fops pointer that can be set in the context creation info.  If set, the array of
fops it points to (terminated by an entry with .open = NULL) is walked to find out the best vfs filesystem
path match (comparing the vfs path to fops.path_prefix) for which fops to use.

If none given (.fops is NULL in info) then behaviour is as before, fops are the platform-provided one only.

2) The built in fileserving now walks any array of fops looking for the best fops match automatically.

3) lws_plat_file_... apis are renamed to lws_vfs_file_...
2017-03-01 14:59:48 +08:00
Andy Green
be8d791b5e adoption: make union for socket and file fds
This lets lws support adopting raw file FDs and raw socket fds.

A test plugin creates a FIFO and prints data sent on it, using
the lws event loop.
2017-03-01 10:01:53 +08:00
Andy Green
8bb3dffc86 fops: add path_prefix member 2017-03-01 10:01:53 +08:00
Lukas Geyer
16ee4b6f0d client: allow change externally-defined wsi user_data
https://github.com/warmcat/libwebsockets/issues/819

AG: add explanation in doxygen comment and check user_space was externally set
2017-02-28 21:17:25 +08:00
Andy Green
6d0c96e06a docs: remove in-tree version
It's a nice idea having them in-tree, but it leaves too much jumk
in the patches.

The up-to-date api for master will continue to be here

https://libwebsockets.org/lws-api-doc-master/html/index.html
2017-02-28 18:44:11 +08:00
Silas Parker
ab89246467 cosmetic fix trailing newline on log 2017-02-28 18:29:57 +08:00
Andy Green
4ca114fbcf cmake: create build/include 2017-02-28 07:51:56 +08:00
Andy Green
73dda1f765 client: take care of rx close during pending partial same as server does
https://github.com/warmcat/libwebsockets/issues/816
2017-02-28 04:03:26 +08:00
Andy Green
1789d0a483 fops: refactor around lws_fops_fd_t 2017-02-26 08:15:42 +08:00
Namowen
96b91cc7ec ssl: avoid EVP errors 2017-02-26 08:15:42 +08:00
Silas Parker
2e1dcc542e Prevent SSL downgrade during redirect 2017-02-23 08:23:21 +08:00
Silas Parker
3db9eca06a Add client support for relative reference redirects 2017-02-23 08:21:25 +08:00
Andy Green
d26d7b0e04 docs: catch up with decruft 2017-02-22 10:26:42 +08:00
Andy Green
a5488f9c27 mbedtls: remove abortive attempt to avoid confusing people
Basically we support openssl api compatibles only.

If we ever try something different we need a shim making it openssl api or a proper abstraction layer added first.
2017-02-22 09:54:47 +08:00
Andy Green
0aed7a06d5 mbed3: sayonara
The port was technically worthwhile and laid the groundwork for ESP support.

But now it is just useless cruft like mbed3 itself...
2017-02-22 09:50:11 +08:00
Joel Winarske
91593d8886 client: allow setting client ssl certs from lwsws and connection info separate from server ssl certs 2017-02-22 07:28:13 +08:00
Joel Winarske
390ba34400 ssl config for http client 2017-02-22 07:17:32 +08:00
Martin Milata
88d6c1a63b gcc format strings: couple more
Found on MIPS
2017-02-22 07:02:02 +08:00
Andy Green
3e0006c206 client: move redirects and c_port out of union
https://github.com/warmcat/libwebsockets/issues/810
2017-02-22 06:55:12 +08:00
Andy Green
3d6a1e11c2 client connect: oom4 clean up timeout list
https://github.com/warmcat/libwebsockets/issues/810
2017-02-21 23:38:40 +08:00
Andy Green
0db9b9f346 client redirect: choose correct error path after resetting client connection
https://github.com/warmcat/libwebsockets/issues/810
2017-02-21 22:59:00 +08:00
Silas Parker
dc4934d2bc ssl close improvement 2017-02-21 19:27:47 +08:00
Andy Green
297c0313fa raw: adoption and processing 2017-02-21 07:47:35 +08:00
Silas Parker
a5f2d8b688 url-parser: handle ipv6 [] addresses 2017-02-21 07:27:07 +08:00
Namowen
7832b236a4 vhost: also free per-vhost protocols list even when no PLUGINS 2017-02-20 06:20:56 +08:00
Andy Green
052a685435 ssl close: do explicit ssl shutdown instead of socket shutdown if ssl mode 2017-02-20 05:44:56 +08:00
Namowen
b8034bb1e5 cosmetic CR missing on some errs 2017-02-19 05:35:55 +08:00
Andy Green
c7c4ae0aa4 ESP32 platform
This is enough for all the test app features to work on ESP32 without
SSL.
2017-02-18 17:27:22 +08:00
Yuchen Xie
936bf08a0f Fix typo 2017-02-18 17:27:22 +08:00
Namowen
40d37e2105 client: fix X509_V_ERR_CERT_HAS_EXPIRED 2017-02-18 17:27:22 +08:00
Joel Winarske
4241af99cb client: direct _APPEND_HANDSHAKE_HEADER at wsi protocol 2017-02-18 17:27:22 +08:00
Yongwen Zhuang
4fd91fa60d Correct Cross compiling commandline 2017-02-18 17:27:22 +08:00
Andy Green
186ba832b3 client: allow http[s] to select targeted protocol name in vhost 2017-02-18 17:27:22 +08:00
Joel Winarske
238766be6b windows: changes to build with VS2015 2017-02-18 17:27:22 +08:00
Silas Parker
f2c6e48eb8 fix close packet index coding
https://github.com/warmcat/libwebsockets/issues/792
2017-02-18 17:27:22 +08:00
Silas Parker
f9f5a57607 gcc-format-strings: ipv6 2017-02-18 17:27:22 +08:00
Per Bothner
baa0f74bf2 gzip fixes 2017-02-18 17:27:22 +08:00
Andy Green
1d393aba9e client: close without spinning
https://github.com/warmcat/libwebsockets/issues/789
2017-02-18 17:27:22 +08:00