summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-12client: avoid possible NULL deref on error pathupstream/1.7.9upstream_210817Andy Green1-1/+4
https://github.com/warmcat/libwebsockets/issues/672
2016-11-29ws-server: restrict returned Sec-Websocket-Protocol to the chosen name onlyAndy Green1-5/+2
https://libwebsockets.org/pipermail/libwebsockets/2016-November/002948.html
2016-11-15client: protect againt losing ah by lws_client_connect_2Andy Green1-0/+5
2016-11-03Remove the cleanup functions with OpenSSL 1.1.Peter Pentchev1-0/+4
2016-10-08travis: explicitly point to openssl on osxAndy Green1-1/+2
One day this started failing at CMake autofind. This forces it to look at the right place.
2016-10-08docs: explain lws_write handling of truncated sends betterAndy Green1-0/+17
2016-09-27windows: fix snprintf vs _snprintfAndy Green1-1/+1
2016-09-27appveyor: get nsis from libwebsockets.orgAndy Green1-1/+2
2016-09-27appveyor: get windows openssl from libwebsockets.orgAndy Green1-1/+1
2016-09-27travis: update to trusty for CMake versionAndy Green1-0/+1
2016-09-27Added option to build the static library with PICBrown, Matthew1-1/+6
2016-09-16CMakeLists: move config file generation to after LWS_HAVE_OPENSSL_ECDH_HFabrice GILOT1-10/+12
This is already fixed in v2.0 and master
2016-09-15v1.7.9Andy Green4-4/+49
SONAME to 7.1 because of lws_snprintf()
2016-09-15lws_snprintfAndy Green6-6/+39
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 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. In 1.7.x, there's no affected code in the library itself, just a couple on instances in the test app code.
2016-06-13fix for https connection codeGadkari Mugdha2-4/+12
2016-06-07client CONNECTION_ERROR also allow in LWSS_CLIENT_UNCONNECTEDAndy Green1-1/+3
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-13Fix leak caused by undestroyed pthread mutexSterling Jensen2-0/+9
2016-05-12v1.7.8Andy Green3-2/+23
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-12check oom on lws_mallocAndy Green2-0/+6
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-07appveyor openssl 1.0.2hAndy Green1-2/+2
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-07fix %3d handling in path part and add attack.shAndy Green2-3/+14
https://github.com/warmcat/libwebsockets/issues/518 Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-05recv revert treating zero as hangupAndy Green1-1/+1
While checking with ab, I found commit 30cdb3ac8f24a4c289a3b4e8a41d6c5f2e6ec959 Author: Justin Chen <justinchen00@github.invalid.com> Date: Thu Apr 14 21:40:53 2016 +0800 recv treat zero return as error https://github.com/warmcat/libwebsockets/issues/475 turned ab performance to crap, reverting it made everything fast again. recv manpage says there is three ways to get zero returned 1) When a stream socket peer has performed an orderly shutdown, the return value will be 0 (the traditional "end-of-file" return). 2) Datagram sockets in various domains (e.g., the UNIX and Internet domains) permit zero-length datagrams. When such a datagram is received, the return value is 0. 3) The value 0 may also be returned if the requested number of bytes to receive from a stream socket was 0. we can't just assume it means the peer shut down. If the peer shut down, then the event loop should get an event on the socket like POLLHUP and deal with it that way. So the patch mentioned above is simply reverted here. Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-03client provide user_space on LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADERAndy Green1-1/+1
https://github.com/warmcat/libwebsockets/issues/509 Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-03v1.7.7Andy Green3-2/+19
Signed-off-by: Andy Green <andy@warmcat.com>
2016-05-03client fix reaction to tls failureAndy Green5-4/+33
https://github.com/warmcat/libwebsockets/issues/508 Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-30Add warn_unused_result check, attribute only supported by GCC 3.4 or laterPatrick Farrell1-1/+8
warn_unused_result was introduced in GCC version 3.4. Change-Id: I6c2cc938d2b868ddfe0889cc41d7fa9d70e1b907
2016-04-23Android needs sys/resource.hAlexander Bruines1-0/+1
2016-04-23v1.7.6Andy Green3-2/+22
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-22cruft remove sigusr2 handlingAndy Green1-17/+0
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-22client account for retriesAndy Green1-0/+3
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-21Update libwebsockets.hhgrundy1-1/+1
Fix for FreeBSD
2016-04-14recv treat zero return as errorJustin Chen1-1/+1
https://github.com/warmcat/libwebsockets/issues/475
2016-04-08windows snprintf is _snprintfMeir Yanovich1-0/+2
https://github.com/warmcat/libwebsockets/issues/411#issuecomment-207290650
2016-04-08android fix rlimitGalen Ma1-1/+14
https://github.com/warmcat/libwebsockets/issues/488
2016-04-07urldecode forbid malformedAndy Green3-47/+532
And update attack.sh to confirm the new test cases Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-07libuv add idle processing to force service where neededAndy Green4-3/+43
https://github.com/warmcat/libwebsockets/issues/485 Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-07lws_service_adjust_timeout optimizeAndy Green1-5/+4
Make it exit quicker if something is pending Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-05revert 622d9f2 ssl pending handcrankAndy Green1-4/+0
https://github.com/warmcat/libwebsockets/issues/483 Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-05win32 libuv build notesMeir Yanovich1-0/+9
2016-04-05win32 needs strange strftime argsMeir Yanovich1-0/+4
2016-04-05libuv win32 fixes 2Meir Yanovich2-4/+7
https://github.com/warmcat/libwebsockets/issues/411#issuecomment-204284368
2016-04-05libuv win32 fixesAndy Green3-4/+19
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-02uri processing reject paths not starting with slashAndy Green1-0/+8
https://github.com/warmcat/libwebsockets/issues/481 Return 403 Forbidden if we don't end up with a uri path starting with / Test server already did this, but this makes it built into the library. Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-01v1.7.5Andy Green3-3/+27
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-01test server align rxbuf with permessage deflate rx buf sizeAndy Green5-15/+60
Add a test html button that will send 9KB of junk to confirm it https://github.com/warmcat/libwebsockets/issues/480 permessage-deflate now checks the protocol rx buffer size for being >=128, if not, permessage-deflate is disabled on that connection. If it is >=128 but less than the zlib decompress buffer size, the zlib decompress buffer size for that connection is reduced to the nearest power of two of the protocol rx buf size. To test this, dumb_increment is left violating the >= 128 rx buffer size and permessage-deflte can be seen to be disabled on his connections in the test html. Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-30Fix build with musl libcV.Krishn2-2/+0
Fix building libwebsockets with the musl C libary. <sys/cdefs.h> is an internal glibc header and should be avoided in user code. __P() was used for compatibility with some old K&R C compilers, when there were no prototypes (which were introduced to C with C89). As supporting legacy non-ANSI compilers is nowadays not necessary anymore get rid of the unnecessary function prototype using __P().
2016-03-29revert cmake remove targets from install pathAndy Green2-1/+9
Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-25http2 build with alpn capable ssl no debugAndy Green1-0/+1
Signed-off-by: Andy Green <andy@warmcat.com>
2016-03-23libuv: handle signals only if requestedDenis Osvald3-11/+36
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-03-22v1.7.4Andy Green3-3/+25
Signed-off-by: Andy Green <andy@warmcat.com>