Commit graph

2143 commits

Author SHA1 Message Date
Bablooos
fded366ea0 Update CMakeLists.txt for BSD + libdl
Fixing build failure of libwebsockets-test-fraggle  on FreeBSD when LWS_WITH_PLUGINS.
Solution: FreeBSD has no libdl
2016-12-16 22:08:13 +08:00
Andy Green
f2a130f9bf generic-sessions: move auth level check to after mount protocol selection 2016-12-16 22:08:13 +08:00
Andy Green
39ec84202d ws-server: restrict returned Sec-Websocket-Protocol to the chosen name only
https://libwebsockets.org/pipermail/libwebsockets/2016-November/002948.html

Updated to fix a problem with no protocol

https://github.com/warmcat/libwebsockets/issues/705
2016-12-16 22:08:13 +08:00
Iblis Lin
62a86ac9c9 server: portable option for setsockopt
From linux ipv6(7) manual (section `Note`):

        SOL_IP, SOL_IPV6, SOL_ICMPV6 and other SOL_* socket options are
        nonportable variants of IPPROTO_*.  See also ip(7).

Ref: http://man7.org/linux/man-pages/man7/ipv6.7.html
2016-12-16 22:08:13 +08:00
sjames1958gm
0fdca9f782 client stash: update path variable to larger size 2016-12-16 22:08:13 +08:00
Andy Green
53bed78950 lws_socket_bind: use lws_sockfd_type 2016-12-16 22:08:13 +08:00
Andy Green
2926553c41 client: protect againt losing ah by lws_client_connect_2 2016-12-16 22:08:13 +08:00
Andy Green
c541e2d7e3 post file upload: dont lose sight of end of upload just because we hit end of incoming post data 2016-12-16 22:08:13 +08:00
Andy Green
5466b9d253 docs update 2016-12-16 22:08:13 +08:00
Joachim Bauch
b3160f9fd0 Added flag to allow expired certificates. 2016-12-16 22:08:13 +08:00
Rainer Poisel
d2cef1515e Better support for MINW32 2016-12-16 22:08:13 +08:00
Yannick Kiekens
e7cc1ffc1e From 7f84bc3e864b52eb13c670362a4b53bc3505393e Mon Sep 17 00:00:00 2001
Subject: [PATCH] Fix typo in lws_create_context documentation
2016-12-16 22:08:13 +08:00
Andy Green
86ab060cd9 client: add lws_http_client_http_response api 2016-12-16 22:08:13 +08:00
Andy Green
fbe66065ff client: treat 304 like 200 2016-12-16 22:08:12 +08:00
Andy Green
b46c401245 alias lws_plat_service_tsi to lws_service_tsi in public api
Via Dosvald

lws_service_tsi() which has been around a while actually just
calls through to lws_plat_service_tsi(), meaning there is no
need to expose both apis.

Rename the internal lws_plat_service_tsi() to _lws_plat_service_tsi()
and replace the api export with a #define to lws_service_tsi for
compatibility's sake.
2016-12-16 22:08:12 +08:00
Andy Green
3b93e344f6 Add reject service keywords list 2016-10-13 06:32:57 +08:00
Andy Green
202e8a7428 adjust_timeout: with default lws_plat_service_tsi allow beings passed 0 timeout
Some people are calling service with zero timeout, taking care of
not busywaiting by some other external arrangements.

Adapt the forced service signalling to survive this.
2016-10-10 20:34:34 +08:00
Joerg Pommnitz
0733610c0e some compilers need void param explicitly 2016-10-10 20:10:39 +08:00
Yuchen Xie
63477ded0c Correct the library name of LIBHUBBUB_LIBRARIES
It should be `hubbub` in `find_library` to make the function work.
2016-10-10 20:10:34 +08:00
Andy Green
abe0c5e57e docs: explain lws_write handling of truncated sends better 2016-10-08 18:08:03 +08:00
Denis Osvald
4be9a5234d publicly document lws_service_fd timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:34:25 +08:00
Denis Osvald
14f994f52a test-server-extpoll: add 1-per-second timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:33:31 +08:00
Denis Osvald
3f8082fecf test-server-extpoll: check for forced service before looping again
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:04:33 +08:00
Andy Green
73557509bd v2.1.0
Bump soname to 9
2016-10-07 03:19:50 +08:00
Andy Green
443b31d012 extpoll: expose forced service apis 2016-10-07 03:19:45 +08:00
Andy Green
8b0dd360aa update attack.sh
Lws cares about trailing \n on a lot of these tests now.  Make it check it still cares on one and remove
the trailing \n on the others.

There's 2 changes in the results about /..//?, it seems to apply / to uri arg 1.  But it doesn't seem
to make a problem so just adapt the results for now.
2016-10-06 20:41:29 +08:00
Andy Green
4cfe81dfba ubuntu: fix uv detection for lwsws 2016-10-05 14:00:55 +08:00
Andy Green
4d79dc553e travis: explicitly point to openssl on osx
One day this started failing at CMake autofind. This forces it to look at the right place.
2016-10-05 10:15:24 +08:00
Andy Green
53ec6b1789 fix cosmetic if end if name tag error 2016-10-05 10:15:16 +08:00
Andy Green
6e8f360e58 closing drops any pending ah rx immediately 2016-10-04 18:05:10 +08:00
Andy Green
65135f2bc4 port forced service checking from libuv
Related to second part of

https://github.com/warmcat/libwebsockets/issues/638
2016-10-04 08:39:14 +08:00
Andy Green
8187c76943 post form parsing fix retry as new boundary start needed after mismatching boundary
https://github.com/warmcat/libwebsockets/issues/641
2016-10-04 08:26:17 +08:00
Peter Pentchev
939bb7f6e9 Remove the cleanup functions with OpenSSL 1.1.
The thread support in OpenSSL has been rewritten almost completely
and the cleanup functions are now executed automatically.
2016-10-04 08:26:13 +08:00
Peter Pentchev
fb71b790cd Subject: Fix some typographical and grammatical errors. 2016-10-03 21:31:27 +08:00
Andy Green
f94bef42c4 lws_header_table_reset: make caller responsibility to clear down ah rx buffer
There are two kinds of reaason to call lws_header_table_reset(), one is we are reallocating
a destroyed ah to another wsi, and the other is we are moving to the next pipelined header set
still on the same wsi, and we need a "weaker" reset that only clears down the state related
to the header parsing, not everything about the ah context including the ah rx buffer.

This patch moves the ah rxbuffer rxpos and rxlen resetting out of lws_header_table_reset() and to
be the responsibility of the caller.  Callers who are moving the ah to another wsi are
patched to deal with resetting rxpos and rxlen and lws_http_transaction_completed() who only
resets the ah when moving to the next pipelined headers, no longer wrongly clears the ah rxbuf.

https://github.com/warmcat/libwebsockets/issues/638
2016-09-29 10:31:06 +08:00
Brown, Matthew
b0ff623526 Added option to build the static library with PIC 2016-09-27 05:32:40 +08:00
Benjamin Ness
668a6fbf29 fix build problem on systems without X509_VERIFY_PARAM type 2016-09-27 05:28:11 +08:00
Patrick Gansterer
e468e15a2b Add SVG to lws_get_mimetype() 2016-09-23 06:31:24 +08:00
Andy Green
0c984014f0 lwsws license to cc0
https://github.com/warmcat/libwebsockets/issues/629
2016-09-19 19:16:47 +08:00
Andy Green
a496700b3a lws_snprintf
Thanks to Fabrice Gilot for reporting the problem that led to uncovering this.

Due to a misunderstanding of the return value of snprintf (it is not truncated according
to the max size passed in) in several places relying on snprintf to truncate the length
overflows are possible.

This patch wraps snprintf with a new lws_snprintf() which does truncate its length to allow
the buffer limiting scheme to work properly.

All users should update with these fixes.
2016-09-15 02:22:57 +08:00
Andy Green
c15714f35a handle rx flow control active when consuming payload
https://github.com/warmcat/libwebsockets/issues/622
2016-09-10 04:54:20 +08:00
Andy Green
b8199ba4ab generic-table: format-security
https://github.com/warmcat/libwebsockets/issues/624
2016-09-10 04:54:20 +08:00
Andy Green
2083674aa0 lws_status protect against pss list changing 2016-09-10 04:54:20 +08:00
Andy Green
9c7e84d346 adopt_socket_vhost: error path doesn't remove us from timeout list
As found by "github user 7"

https://github.com/warmcat/libwebsockets/issues/621
2016-09-10 04:54:20 +08:00
Fredrik Skogman
6ecbe3e93f Do not use ps fax on Solaris. 2016-09-10 04:53:31 +08:00
Fredrik Skogman
9c04a107c9 Updated test programs to build on Solaris. Some whitespaces cleanup. 2016-09-10 04:53:28 +08:00
Fredrik Skogman
316960b87d Added build support for Solaris. 2016-09-09 06:52:42 +08:00
Fredrik Skogman
9de43fc9d7 Check for sys/sockio.h. 2016-09-09 06:48:24 +08:00
Andy Green
723b3f16fa client http: extra read notification after close
https://github.com/warmcat/libwebsockets/issues/620
2016-09-06 15:36:51 +08:00
Andy Green
64dd359192 windows: WCHAR in lws_plat_inet_ntop needs double the final allocation
https://github.com/warmcat/libwebsockets/issues/619
2016-09-05 15:03:37 +08:00