platform/upstream/libwebsockets.git
6 years agoSubject: Fixed value of LIBWEBSOCKETS_LIBRARIES_STATIC
Sergey Kovalevich [Mon, 29 May 2017 18:44:01 +0000 (21:44 +0300)]
Subject: Fixed value of LIBWEBSOCKETS_LIBRARIES_STATIC

6 years agoSubject: Fixed build in scope of a project (add_subdirectory)
Sergey Kovalevich [Mon, 29 May 2017 15:48:01 +0000 (18:48 +0300)]
Subject: Fixed build in scope of a project (add_subdirectory)

6 years agoSubject: Direct extension confirmation to the negotiated protocol's callback
emptyVoid [Sat, 27 May 2017 15:51:58 +0000 (22:51 +0700)]
Subject: Direct extension confirmation to the negotiated protocol's callback

Fixes #897

Notice this means if you want to globally ban an extension, you should
no longer include the extension at context creation time.

6 years agoSubject: libuv: Fix closing handle multiple times
Petar Paradzik [Fri, 19 May 2017 12:41:03 +0000 (14:41 +0200)]
Subject: libuv: Fix closing handle multiple times

Sometimes "Assertion failed: !uv__is_closing(handle)" happens because
handle is being closed multiple times. To fix this, "uv_is_closing"
is added before calling "uv_close".

Signed-off-by: Petar Paradzik <petar.paradzik@sartura.hr>
6 years agoesp32: otf and use group-role as hostname if present
Andy Green [Mon, 22 May 2017 06:01:08 +0000 (14:01 +0800)]
esp32: otf and use group-role as hostname if present

6 years agoesp32: debounced button events
Andy Green [Sat, 20 May 2017 23:38:49 +0000 (07:38 +0800)]
esp32: debounced button events

6 years agoesp32: led network state helper
Andy Green [Sat, 20 May 2017 23:33:09 +0000 (07:33 +0800)]
esp32: led network state helper

6 years agocgi: close unforked std fds
Andy Green [Sat, 20 May 2017 00:05:27 +0000 (08:05 +0800)]
cgi: close unforked std fds

6 years agoLICENSE: clarify exceptions also apply to LGPL self-refernences
Andy Green [Fri, 19 May 2017 01:25:54 +0000 (09:25 +0800)]
LICENSE: clarify exceptions also apply to LGPL self-refernences

via Mike Atamas, Counsel for Epic Games

6 years agocgi: apply chunked grace period only when explicitly chunked
Andy Green [Fri, 19 May 2017 00:33:33 +0000 (08:33 +0800)]
cgi: apply chunked grace period only when explicitly chunked

6 years agocgi: handle no body to keep events coming
Andy Green [Thu, 18 May 2017 15:20:12 +0000 (23:20 +0800)]
cgi: handle no body to keep events coming

6 years agocgi: allow time travelling headers to decide response code
Andy Green [Thu, 18 May 2017 13:19:57 +0000 (21:19 +0800)]
cgi: allow time travelling headers to decide response code

https://github.com/warmcat/libwebsockets/issues/899

6 years agoclient: added socks5 proxy support
Andy Ning [Fri, 5 May 2017 15:38:34 +0000 (11:38 -0400)]
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>
6 years agoplugins: group
Andy Green [Tue, 16 May 2017 12:21:47 +0000 (20:21 +0800)]
plugins: group

6 years agoesp32: group tracking
Andy Green [Tue, 16 May 2017 11:35:55 +0000 (19:35 +0800)]
esp32: group tracking

6 years agoadoption: close socket manually if fails before add fds
Andy Green [Mon, 15 May 2017 00:10:08 +0000 (08:10 +0800)]
adoption: close socket manually if fails before add fds

6 years agostats: ah and ssl restriction stats
Andy Green [Sun, 14 May 2017 23:30:06 +0000 (07:30 +0800)]
stats: ah and ssl restriction stats

6 years agoesp32: group mdns
Andy Green [Sun, 14 May 2017 06:55:15 +0000 (14:55 +0800)]
esp32: group mdns

6 years agoesp32: multi ap slots
Andy Green [Sat, 13 May 2017 02:26:59 +0000 (10:26 +0800)]
esp32: multi ap slots

6 years agoesp32: multi ap slots plus PEM certs and parallel build fixes
Andy Green [Thu, 11 May 2017 07:02:01 +0000 (15:02 +0800)]
esp32: multi ap slots plus PEM certs and parallel build fixes

6 years agoLWS_WITH_STATS
Andy Green [Sun, 7 May 2017 02:02:03 +0000 (10:02 +0800)]
LWS_WITH_STATS

6 years agolws_write: report and reject suspicious lengths
Andy Green [Mon, 8 May 2017 02:49:10 +0000 (10:49 +0800)]
lws_write: report and reject suspicious lengths

6 years agoesp32: add leds sine fade helper
Andy Green [Sun, 7 May 2017 05:24:48 +0000 (13:24 +0800)]
esp32: add leds sine fade helper

6 years agoesp32: reapply pending count just for esp32
Andy Green [Sun, 7 May 2017 00:19:55 +0000 (08:19 +0800)]
esp32: reapply pending count just for esp32

6 years agoplugin-standalone: refactor cmake part to ease multiple sources
Andy Green [Fri, 5 May 2017 22:38:59 +0000 (06:38 +0800)]
plugin-standalone: refactor cmake part to ease multiple sources

7 years agoesp32: mac build: use gstat if exists
Andy Green [Thu, 4 May 2017 18:17:28 +0000 (02:17 +0800)]
esp32: mac build: use gstat if exists

7 years agonon-ssl: return 0 on pending
Andy Green [Wed, 3 May 2017 13:28:26 +0000 (21:28 +0800)]
non-ssl: return 0 on pending

https://github.com/warmcat/libwebsockets/issues/887

7 years agosnprintf: move contributed ssl patch to lws_snprintf
Andy Green [Wed, 3 May 2017 12:25:16 +0000 (20:25 +0800)]
snprintf: move contributed ssl patch to lws_snprintf

7 years agoesp32: client: SO_SNDBUF not usable
Andy Green [Fri, 28 Apr 2017 16:55:06 +0000 (00:55 +0800)]
esp32: client: SO_SNDBUF not usable

7 years agoesp32: return random length from lws_get_random
Andy Green [Fri, 28 Apr 2017 03:54:27 +0000 (11:54 +0800)]
esp32: return random length from lws_get_random

7 years agoesp32: return random count
Andy Green [Fri, 28 Apr 2017 03:53:28 +0000 (11:53 +0800)]
esp32: return random count

7 years agoSubject: windows: fops write support
Joel Winarske [Wed, 19 Apr 2017 21:55:21 +0000 (14:55 -0700)]
Subject: windows: fops write support

7 years agoSubject: ssl: stop spinning on close
Martin Milata [Thu, 6 Apr 2017 17:37:14 +0000 (19:37 +0200)]
Subject: ssl: stop spinning on close

7 years agowindows: constify first arg of plat fops open
dspname [Wed, 19 Apr 2017 12:28:48 +0000 (20:28 +0800)]
windows: constify first arg of plat fops open

https://github.com/warmcat/libwebsockets/issues/871

7 years agowindows: align choked trunc checking with unix
Andy Green [Tue, 18 Apr 2017 07:17:22 +0000 (15:17 +0800)]
windows: align choked trunc checking with unix

7 years agoesp32: update for soc refactor in esp-idf 9edab21385b6349340d7e3ac27b730e44a127fd3
Andy Green [Sun, 16 Apr 2017 23:38:28 +0000 (07:38 +0800)]
esp32: update for soc refactor in esp-idf 9edab21385b6349340d7e3ac27b730e44a127fd3

7 years agoSubject: Save copy of ah pointer even with WS client so that HTTP
Gecko [Mon, 10 Apr 2017 04:31:50 +0000 (21:31 -0700)]
Subject: Save copy of ah pointer even with WS client so that HTTP
 error can be captured by calling lws_http_client_http_response.

7 years agoclient: allow 201
Andy Green [Sat, 8 Apr 2017 23:56:41 +0000 (07:56 +0800)]
client: allow 201

7 years agossl: only apply restriction if nonzero for vhost
Andy Green [Fri, 7 Apr 2017 12:51:44 +0000 (20:51 +0800)]
ssl: only apply restriction if nonzero for vhost

7 years agobind protocol: fix for NULL names
Silas Parker [Fri, 7 Apr 2017 10:22:54 +0000 (18:22 +0800)]
bind protocol: fix for NULL names

7 years agoesp32-fix-random
Andy Green [Fri, 7 Apr 2017 10:20:21 +0000 (18:20 +0800)]
esp32-fix-random

7 years agoesp32: workaround cant find TLS_client_method
Andy Green [Fri, 7 Apr 2017 03:29:57 +0000 (11:29 +0800)]
esp32: workaround cant find TLS_client_method

7 years agoraw: defer creation callback until after fds inserted
Andy Green [Fri, 7 Apr 2017 03:25:55 +0000 (11:25 +0800)]
raw: defer creation callback until after fds inserted

7 years agoboilerplate: add back missing Lesser that cut-and-pasted itself around
Andy Green [Thu, 6 Apr 2017 15:01:34 +0000 (23:01 +0800)]
boilerplate: add back missing Lesser that cut-and-pasted itself around

7 years agoSubject: ssl: fix OpenSSL client method detection
Martin Milata [Thu, 6 Apr 2017 13:46:37 +0000 (15:46 +0200)]
Subject: ssl: fix OpenSSL client method detection

7 years agoraw: take care about same vh protocol linked list
Andy Green [Thu, 6 Apr 2017 05:49:17 +0000 (13:49 +0800)]
raw: take care about same vh protocol linked list

7 years agoadopt: use default protocol in given vhost
Andy Green [Thu, 6 Apr 2017 04:47:42 +0000 (12:47 +0800)]
adopt: use default protocol in given vhost

7 years agossl: OpenSSL v1.1 deprecated TLSv1_2_client_method
Andy Green [Thu, 6 Apr 2017 00:32:03 +0000 (08:32 +0800)]
ssl: OpenSSL v1.1 deprecated TLSv1_2_client_method

7 years agoadopt: LWS_SERVER_OPTION_ONLY_RAW to indicate a vhost only serves raw
Andy Green [Wed, 5 Apr 2017 23:57:45 +0000 (07:57 +0800)]
adopt: LWS_SERVER_OPTION_ONLY_RAW to indicate a vhost only serves raw

7 years agoesp32: force bash
Andy Green [Wed, 5 Apr 2017 20:44:25 +0000 (04:44 +0800)]
esp32: force bash

7 years agoesp32: ROMFS use checksum as mtime so ETAG caching works
Andy Green [Wed, 5 Apr 2017 02:44:28 +0000 (10:44 +0800)]
esp32: ROMFS use checksum as mtime so ETAG caching works

7 years agopollout: handle request for pollout during pollout service
Andy Green [Wed, 5 Apr 2017 00:30:55 +0000 (08:30 +0800)]
pollout: handle request for pollout during pollout service

7 years agowindows: _snprintf_s
Renyaow [Tue, 4 Apr 2017 17:55:38 +0000 (01:55 +0800)]
windows: _snprintf_s

  https://github.com/warmcat/libwebsockets/issues/859

7 years agoesp32: allow no factory upload info
Andy Green [Tue, 4 Apr 2017 00:46:51 +0000 (08:46 +0800)]
esp32: allow no factory upload info

7 years agoesp32: enforce ssl nonblocking
Andy Green [Mon, 3 Apr 2017 06:09:37 +0000 (14:09 +0800)]
esp32: enforce ssl nonblocking

7 years agoesp32: dont require factory button if no ssl certs yet
Andy Green [Mon, 3 Apr 2017 03:56:33 +0000 (11:56 +0800)]
esp32: dont require factory button if no ssl certs yet

7 years agologs: reduce ah err to info
Andy Green [Sun, 2 Apr 2017 05:01:07 +0000 (13:01 +0800)]
logs: reduce ah err to info

7 years agoesp32: separate factory setup
Andy Green [Thu, 16 Mar 2017 02:46:31 +0000 (10:46 +0800)]
esp32: separate factory setup

7 years agowindows: need LWS_INLINE
paularmitt [Fri, 31 Mar 2017 11:55:42 +0000 (19:55 +0800)]
windows: need LWS_INLINE

7 years agolws_remove_child_from_any_parent: clear parent pointer and fix failure message
Andy Green [Thu, 30 Mar 2017 00:31:36 +0000 (08:31 +0800)]
lws_remove_child_from_any_parent: clear parent pointer and fix failure message

7 years agoev: stop event listeners during context destroy
Olivier Basson [Wed, 29 Mar 2017 00:20:42 +0000 (08:20 +0800)]
ev: stop event listeners during context destroy

I think I've found a bug in libev backend, in function lws_libev_io(). I'm using latest version from master branch.

When deleting a context with active connections via lws_context_destroy(), context->being_destroyed is set to 1 early in the function, before the loop calling lws_close_free_wsi() on each active connection.
lws_close_free_wsi() calls remove_wsi_socket_from_fds(), which calls lws_libev_io(), and here is my problem :

lws_libev_io() returns without doing anything if context->being_destroyed is set, so libev callbacks for deleted connections file descriptors stay registered after context is destroyed, which may lead to segfault/undefined behaviour if these file descriptors get reused later (which would trigger the callbacks).

I think the "if (!pt->io_loop_ev || context->being_destroyed) return;" statement should be replaced with " if (!pt->io_loop_ev) return;"

This fixes the problem for me and I have not seen any side effect yet. Moreover, libuv backend does not have such a test.

7 years agoservice: always restrict rx to serve_buf_size
Andy Green [Tue, 28 Mar 2017 00:51:37 +0000 (08:51 +0800)]
service: always restrict rx to serve_buf_size

7 years agopmd: handle case we are already on drain list
Andy Green [Sun, 26 Mar 2017 02:08:35 +0000 (10:08 +0800)]
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

7 years agopmd: align client rx sm with server one
Andy Green [Sat, 25 Mar 2017 00:42:35 +0000 (08:42 +0800)]
pmd: align client rx sm with server one

7 years agoclient: zero length read indicates peer shutdown
Andy Green [Sat, 25 Mar 2017 00:47:06 +0000 (08:47 +0800)]
client: zero length read indicates peer shutdown

7 years agosolaris: handle big-endian
luk65 [Thu, 23 Mar 2017 15:56:25 +0000 (23:56 +0800)]
solaris: handle big-endian

https://github.com/warmcat/libwebsockets/issues/846

7 years agospa: reject junk after finalization
Andy Green [Thu, 23 Mar 2017 11:30:12 +0000 (19:30 +0800)]
spa: reject junk after finalization

7 years agotest-server-v2.0: disable setting default protocol
Andy Green [Wed, 22 Mar 2017 13:18:48 +0000 (21:18 +0800)]
test-server-v2.0: disable setting default protocol

7 years agodebug: reduce spew for debug log level
Andy Green [Wed, 22 Mar 2017 13:16:00 +0000 (21:16 +0800)]
debug: reduce spew for debug log level

7 years agocgi: avoid spin on php
Andy Green [Wed, 22 Mar 2017 12:15:01 +0000 (20:15 +0800)]
cgi: avoid spin on php

7 years agoSubject: Libevent: Initial Support
Aditya Tirumala [Wed, 15 Mar 2017 14:11:11 +0000 (19:41 +0530)]
Subject: Libevent: Initial Support

* Added libevent support functionality into lib/libevent.c
* Added test-server-libevent for testing

7 years agotest-server-v2.0: add string.h include
Andy Green [Tue, 21 Mar 2017 21:29:22 +0000 (05:29 +0800)]
test-server-v2.0: add string.h include

via Joel Winarske on ml

7 years agoCMake: add option to avoid GISPIPE IGN for Android 7+
Andy Green [Tue, 21 Mar 2017 03:34:49 +0000 (11:34 +0800)]
CMake: add option to avoid GISPIPE IGN for Android 7+

7 years agoext: pmd: improve dealing with partial input usage with drain
Andy Green [Mon, 20 Mar 2017 11:07:19 +0000 (19:07 +0800)]
ext: pmd: improve dealing with partial input usage with drain

https://github.com/warmcat/libwebsockets/issues/841

7 years agorpm: added missing file to %files section of spec file
Steffen Vogel [Sat, 18 Mar 2017 03:06:37 +0000 (00:06 -0300)]
rpm: added missing file to %files section of spec file

7 years agowindows: cannot use fstat
Andy Green [Fri, 17 Mar 2017 03:43:45 +0000 (11:43 +0800)]
windows: cannot use fstat

7 years agodocs: lws_callback_all_protocol: fix cut-n-paste error and explain it is probably...
Andy Green [Tue, 14 Mar 2017 23:28:51 +0000 (07:28 +0800)]
docs: lws_callback_all_protocol: fix cut-n-paste error and explain it is probably not what you want

7 years agowindows: don't use LWS_EXTERN outside of function declarations
Andy Green [Tue, 14 Mar 2017 23:25:36 +0000 (07:25 +0800)]
windows: don't use LWS_EXTERN outside of function declarations

7 years agoesp32: openssl
Andy Green [Sat, 11 Mar 2017 03:51:06 +0000 (11:51 +0800)]
esp32: openssl

7 years agoesp32: move helper code into lws
Andy Green [Fri, 10 Mar 2017 06:29:21 +0000 (14:29 +0800)]
esp32: move helper code into lws

7 years agossl: close sometimes continuously asserting POLLIN until timeout
Silas Parker [Thu, 9 Mar 2017 23:46:05 +0000 (07:46 +0800)]
ssl: close sometimes continuously asserting POLLIN until timeout

https://github.com/warmcat/libwebsockets/issues/831

7 years agofops_zip: require libz
Silas Parker [Thu, 9 Mar 2017 11:21:40 +0000 (19:21 +0800)]
fops_zip: require libz

7 years agogcc-format-strings: 32-bit build
Silas Parker [Thu, 9 Mar 2017 10:52:10 +0000 (18:52 +0800)]
gcc-format-strings: 32-bit build

7 years agohttp2: fix log compile errors
honjane [Thu, 9 Mar 2017 05:17:07 +0000 (13:17 +0800)]
http2: fix log compile errors

7 years agov2.2.0
Andy Green [Mon, 6 Mar 2017 07:35:45 +0000 (15:35 +0800)]
v2.2.0

7 years agocoverity 177526: pointer difference already scaled
Andy Green [Wed, 8 Mar 2017 06:10:31 +0000 (14:10 +0800)]
coverity 177526: pointer difference already scaled

7 years agoesp32: align fops member name defines
Andy Green [Wed, 8 Mar 2017 03:11:41 +0000 (11:11 +0800)]
esp32: align fops member name defines

7 years agoreduce log spew on POST processing
Andy Green [Wed, 8 Mar 2017 02:52:49 +0000 (10:52 +0800)]
reduce log spew on POST processing

7 years agoserver-name: add_server_header add LWSAHH_FLAG_NO_SERVER_NAME
Andy Green [Tue, 7 Mar 2017 23:51:47 +0000 (07:51 +0800)]
server-name: add_server_header add LWSAHH_FLAG_NO_SERVER_NAME

Also clean up usage of status code defines in lws

7 years agoserver-name: default to no server name unless set in context
Andy Green [Tue, 7 Mar 2017 23:35:27 +0000 (07:35 +0800)]
server-name: default to no server name unless set in context

7 years agoraw: enable server and client raw sockets
Andy Green [Tue, 7 Mar 2017 08:06:05 +0000 (16:06 +0800)]
raw: enable server and client raw sockets

7 years agoext: use arguments and reply with them
Andy Green [Tue, 7 Mar 2017 02:07:37 +0000 (10:07 +0800)]
ext: use arguments and reply with them

7 years agocoverity 177409: dont bother assigning ignored second SSL_shutdown return value
Andy Green [Mon, 6 Mar 2017 06:01:46 +0000 (14:01 +0800)]
coverity 177409: dont bother assigning ignored second SSL_shutdown return value

No security impact

7 years agocoverity 177410: check seek return value inside fops-zip
Andy Green [Mon, 6 Mar 2017 05:59:27 +0000 (13:59 +0800)]
coverity 177410: check seek return value inside fops-zip

Truncated or corrupted zip on server side would read garbage instead of fail.

7 years agotest-client: only take data from LWS_CALLBACK_RECEIVE_CLIENT_HTTP
Andy Green [Mon, 6 Mar 2017 04:42:08 +0000 (12:42 +0800)]
test-client: only take data from LWS_CALLBACK_RECEIVE_CLIENT_HTTP

7 years agofops-zip
Andy Green [Fri, 3 Mar 2017 04:38:10 +0000 (12:38 +0800)]
fops-zip

7 years agorx flow: handle child state change during parent cb
Andy Green [Sun, 5 Mar 2017 07:32:47 +0000 (15:32 +0800)]
rx flow: handle child state change during parent cb

7 years agojunzip: style and migrate header into private-libwebsockets.h
Andy Green [Fri, 3 Mar 2017 01:19:14 +0000 (09:19 +0800)]
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.

7 years agojunzip: import from DomTerm 912add15f3d0aec
Andy Green [Fri, 3 Mar 2017 00:44:04 +0000 (08:44 +0800)]
junzip: import from DomTerm 912add15f3d0aec

From https://github.com/PerBothner/DomTerm.git

7 years agoev: fix build
Andy Green [Fri, 3 Mar 2017 00:18:16 +0000 (08:18 +0800)]
ev: fix build