Andy Green
8f4f692945
ah: require parsing complete before detach
...
Introduce helpers to force to detachable state and to test the ah is
in a detachable state.
Require not only the ah rx buffer is all used, but that the
wsi has completed a full set of headers.
2017-06-28 12:13:13 +08:00
Andy Green
ede9ad2b13
client: add libuv support to lws_client_reset
...
More direct solution to problem described in
https://github.com/warmcat/libwebsockets/pull/940
2017-06-26 08:36:49 +08:00
Andy Green
c70f6692f8
client: getaddrinfo refactor
...
https://github.com/warmcat/libwebsockets/issues/926
2017-06-20 15:56:48 +08:00
Andy Green
3ff720ff66
support openssl info callback
...
https://github.com/warmcat/libwebsockets/issues/936
2017-06-20 11:46:49 +08:00
Andy Green
449eec9b54
client: add iface in connection info, dont use vhost iface
2017-06-14 09:45:30 +08:00
WebsocketUser
0be9e98aae
win32: enable 64-bit file lengths
...
https://github.com/warmcat/libwebsockets/issues/916
AG added more appveyor warning cleaning and stitched in cmake tests
2017-06-09 20:20:42 +08:00
Andy Green
02638f6758
large files: convert content-length to use lws_filepos_t
2017-06-07 08:20:18 +08:00
Leonardo Maccari Rufino
393b38aed9
Subject: Support to bind accepted socket to device on Linux
...
AG: move new member to end of info,
allow info member even on nonsupporting platform,
document requires root,
apply only to listen skt before we drop root,
add -k to test server to allow testing
2017-06-07 08:13:11 +08:00
Andy Green
156363f3de
capabilities support
2017-06-07 06:49:20 +08:00
Leonardo Maccari Rufino
af7f943e05
Subject: windows: support to bind to a specific IPv6 address
2017-06-06 07:44:50 +08:00
Andy Green
3844988b6c
cgi: apply chunked grace period only when explicitly chunked
2017-05-19 08:33:33 +08:00
Andy Green
de12c860db
cgi: allow time travelling headers to decide response code
...
https://github.com/warmcat/libwebsockets/issues/899
2017-05-18 21:19:57 +08:00
Andy Ning
ed92b6dfe7
client: added socks5 proxy support
...
AG:
- move creation info members to end of struct
- add LWS_WITH_SOCKS5 CMake var, defaults to OFF
- cast away some warnings about signed / unsigned in strncpy
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2017-05-17 06:18:45 +08:00
Andy Green
fbc1ff6e7b
stats: ah and ssl restriction stats
2017-05-15 07:30:06 +08:00
Andy Green
b2f8bc5638
esp32: multi ap slots
2017-05-13 10:26:59 +08:00
Andy Green
54236bd437
esp32: multi ap slots plus PEM certs and parallel build fixes
2017-05-11 15:02:01 +08:00
Andy Green
a7def3ce44
LWS_WITH_STATS
2017-05-09 14:19:43 +08:00
Andy Green
19242db55b
raw: take care about same vh protocol linked list
2017-04-06 13:49:17 +08:00
Andy Green
89212d6668
pollout: handle request for pollout during pollout service
2017-04-05 08:30:55 +08:00
Andy Green
00ae90978b
esp32: separate factory setup
2017-03-31 20:05:10 +08:00
Andy Green
d58353f98a
pmd: handle case we are already on drain list
...
Provide internal helper for adding to list that takes care of the
case we are already on the list.
https://github.com/warmcat/libwebsockets/issues/847
2017-03-26 10:19:34 +08:00
Andy Green
7aadd14398
pmd: align client rx sm with server one
2017-03-25 08:48:23 +08:00
luk65
a4d23648f7
solaris: handle big-endian
...
https://github.com/warmcat/libwebsockets/issues/846
2017-03-24 06:51:06 +08:00
Aditya Tirumala
ec50ebac12
Subject: Libevent: Initial Support
...
* Added libevent support functionality into lib/libevent.c
* Added test-server-libevent for testing
2017-03-22 05:36:25 +08:00
Andy Green
3a09c3b7d6
esp32: align fops member name defines
2017-03-08 11:11:41 +08:00
Andy Green
205ccedf6e
raw: enable server and client raw sockets
2017-03-07 16:06:05 +08:00
Andy Green
19cc7acb24
fops-zip
2017-03-05 15:32:55 +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
04054b4072
ev: fix build
2017-03-03 08:18:16 +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
1789d0a483
fops: refactor around lws_fops_fd_t
2017-02-26 08:15: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
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
Andy Green
297c0313fa
raw: adoption and processing
2017-02-21 07:47:35 +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
Namowen
40d37e2105
client: fix X509_V_ERR_CERT_HAS_EXPIRED
2017-02-18 17:27:22 +08:00
Andy Green
31c5130802
client: fix redirects and allow ssl / non-ssl redirects
2017-02-09 15:25:01 +08:00
Andy Green
9395eb62ce
LWS_PLAT_OPTEE: Convert to use TEE_Malloc
...
OPTEE TAs should allocate via TEE_Malloc
2017-02-07 00:51:25 +08:00
Denis Osvald
76985f256d
wsi remove unused 'upgraded' boolean field
...
It was introduced in 7df53c5550
but was never used...
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2017-01-23 20:04:06 +08:00
Andy Green
1e22719f5e
polarssl: turn off missing tlsext
2017-01-07 10:24:16 +08:00
Andy Green
c001a15973
openssl: deal with missing OPENSSL_NO_TLSEXT on ancient versions
2017-01-06 09:49:28 +08:00
Andy Green
a0c4a0e253
cgi: 5s grace to send buffered if chunked
2017-01-03 08:18:37 +08:00
Andy Green
714f66f5b7
windows: remove preprocessor business for [v]snprintf
...
https://github.com/warmcat/libwebsockets/issues/731
2016-12-28 15:23:34 +08:00
Andy Green
dd0dfaecb7
ESP8266: LWS_POSIX fixes for basic auth and deprecated context
2016-12-22 11:32:34 +08:00
Andy Green
be9fb919d1
context deprecation
...
1) This makes lwsws run a parent process with the original permissions.
But this process is only able to respond to SIGHUP, it doesn't do anything
else.
2) You can send this parent process a SIGHUP now to cause it to
- close listening sockets in existing lwsws processes
- mark those processes as to exit when the number of active connections
on the falls to zero
- spawn a fresh child process from scratch, using latest configuration
file content, latest plugins, etc. It can now reopen listening sockets
if it chooses to, or open different listen ports or whatever.
Notes:
1) lws_context_destroy() has been split into two pieces... the reason for
the split is the first part closes the per-vhost protocols, but since
they may have created libuv objects in the per-vhost protocol storage,
these cannot be freed until after the loop has been run.
That's the purpose of the second part of the context destruction,
lws_context_destroy2().
For compatibility, if you are not using libuv, the first part calls the
second part. However if you are using libuv, you must now call the
second part from your own main.c after the first part.
2016-12-20 14:37:07 +08:00
Andy Green
ed4acef481
RFC7233 HTTP Ranges support for server
...
This adds a serverside implementation of RFC7233 HTTP ranges.
- LWS_WITH_RANGES is on by default at cmake
- Accept-Ranges: bytes is added if LWS_WITH_RANGES is enabled
- Both single ranges and multipart (2+) ranges are supported
Test with curl like this
Single
$ $ curl -s -r 64-95 http://localhost:7681/libwebsockets.org-logo.png | hexdump -C
00000000 2e 01 fd 9d 12 27 00 00 00 19 74 45 58 74 53 6f |.....'....tEXtSo|
00000010 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 |ftware.www.inksc|
Multipart
$ curl -s -r 64-95,128-143 http://localhost:7681/libwebsockets.org-logo.png | hexdump -C
00000000 5f 6c 77 73 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 |_lws..Content-Ty|
00000010 70 65 3a 20 69 6d 61 67 65 2f 70 6e 67 0d 0a 43 |pe: image/png..C|
00000020 6f 6e 74 65 6e 74 2d 52 61 6e 67 65 3a 20 62 79 |ontent-Range: by|
00000030 74 65 73 20 36 34 2d 39 35 2f 37 30 32 39 0d 0a |tes 64-95/7029..|
00000040 0d 0a 2e 01 fd 9d 12 27 00 00 00 19 74 45 58 74 |.......'....tEXt|
00000050 53 6f 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b |Software.www.ink|
00000060 73 63 5f 6c 77 73 0d 0a 43 6f 6e 74 65 6e 74 2d |sc_lws..Content-|
00000070 54 79 70 65 3a 20 69 6d 61 67 65 2f 70 6e 67 0d |Type: image/png.|
00000080 0a 43 6f 6e 74 65 6e 74 2d 52 61 6e 67 65 3a 20 |.Content-Range: |
00000090 62 79 74 65 73 20 31 32 38 2d 31 34 33 2f 37 30 |bytes 128-143/70|
000000a0 32 39 0d 0a 0d 0a 05 14 50 40 05 15 a5 c4 60 43 |29......P@....`C|
000000b0 91 c4 4a d4 c4 fc 5f 6c 77 73 0d 00 |..J..._lws..|
The corresponding header part is like this
0x0030: 4854 5450 2f31 2e31 2032 3036 HTTP/1.1.206
0x0040: 200d 0a73 6572 7665 723a 206c 7773 7773 ...server:.lwsws
0x0050: 0d0a 636f 6e74 656e 742d 7479 7065 3a20 ..content-type:.
0x0060: 6d75 6c74 6970 6172 742f 6279 7465 7261 multipart/bytera
0x0070: 6e67 6573 0d0a 6163 6365 7074 2d72 616e nges..accept-ran
0x0080: 6765 733a 2062 7974 6573 0d0a 636f 6e74 ges:.bytes..cont
0x0090: 656e 742d 6c65 6e67 7468 3a20 3138 380d ent-length:.188.
0x00a0: 0a63 6163 6865 2d63 6f6e 7472 6f6c 3a20 .cache-control:.
0x00b0: 7072 6976 6174 6520 6d61 782d 6167 653a private.max-age:
0x00c0: 2036 300d 0a63 6f6e 6e65 6374 696f 6e3a .60..connection:
0x00d0: 206b 6565 702d 616c 6976 650d 0a65 7461 .keep-alive..eta
0x00e0: 673a 2030 3030 3031 4237 3535 3444 3433 g:.00001B7554D43
0x00f0: 3033 330d 0a0d 0a 033....
2016-12-20 14:37:07 +08:00