Commit graph

1880 commits

Author SHA1 Message Date
Andy Green
56826dbfd7 post file upload: dont lose sight of end of upload just because we hit end of incoming post data 2016-11-14 18:16:36 +08:00
Rainer Poisel
9d061e1efd Better support for MINW32 2016-11-09 08:34:27 +08:00
Yannick Kiekens
1e2e150ec4 From 7f84bc3e864b52eb13c670362a4b53bc3505393e Mon Sep 17 00:00:00 2001
Subject: [PATCH] Fix typo in lws_create_context documentation
2016-11-03 17:57:13 +08:00
Andy Green
5fb327754a 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 23:21:48 +08:00
Joerg Pommnitz
e2fcb94147 some compilers need void param explicitly 2016-10-10 20:06:06 +08:00
Yuchen Xie
5df8bf9d83 Correct the library name of LIBHUBBUB_LIBRARIES
It should be `hubbub` in `find_library` to make the function work.
2016-10-10 20:03:53 +08:00
Andy Green
6670c6f953 docs: explain lws_write handling of truncated sends better 2016-10-08 18:09:18 +08:00
Denis Osvald
549b7ad023 publicly document lws_service_fd timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:35:12 +08:00
Denis Osvald
af8692e36f test-server-extpoll: add 1-per-second timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:35:08 +08:00
Denis Osvald
6b7f30ef64 test-server-extpoll: check for forced service before looping again
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:04:19 +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
Andy Green
72502e86f5 coverity 169276-9 - false positive assuming 8b char: char limits index size 2016-08-28 09:49:30 +08:00
Andy Green
d11bee7fc5 coverity 169274 - lwsgt dirlisting ignore files that cant be statted 2016-08-28 09:44:15 +08:00
Andy Green
01020b60f6 coverity 169273 - off-by-one on cgi chunking swallow limit 2016-08-28 09:44:15 +08:00
Andy Green
d6761e87b5 coverity 169272 - off-by-one possible on CGI buffer limit 2016-08-28 09:44:15 +08:00
Andy Green
d8e051dd97 coverity 169271 - take care about sockfd of -1 on close 2016-08-28 09:44:15 +08:00
Andy Green
2f863cf59a coverity 169269 - dont issue NULL cce 2016-08-28 09:44:15 +08:00
Andy Green
cd02a15669 coverity 169268 + 169270- dead code plus repeat NULL check on error path 2016-08-28 09:44:15 +08:00
Andy Green
e0212b8c85 coverity 169275 - lwsgt check string bounds 2016-08-28 09:44:15 +08:00
Andy Green
16f3e4cacf coverity 169267 - lwsgt strncpy may fill buffer without NUL 2016-08-28 09:10:40 +08:00
Andy Green
e35d91a860 per-vhost headers and lwsws conf support
This l;ets you add per-vhost arbitrary headers on served files, eg

     "headers": [{
        "X-Content-Type-Options": "nosniff",
        "X-XSS-Protection": "1; mode=block",
        "x-frame-options": "SAMEORIGIN"
        }],
2016-08-27 17:07:06 +08:00
Patrick Gansterer
46646f9ebf Update badges in README.md
Fix the link to Appveyor and use SVG images.
2016-08-27 05:57:18 +08:00
Patrick Gansterer
396b58ce70 Remove unneeded #include <stdint.h>
This fixes the build for Visual Studio 2008.
2016-08-26 18:31:09 +08:00
Andy Green
a5ec7212ff test html: js date uses ms 2016-08-23 18:29:17 +08:00