Commit graph

1579 commits

Author SHA1 Message Date
Andy Green
1700265081 osx clang quench deprecated api errors
after approach by redhat

https://bugzilla.redhat.com/show_bug.cgi?id=1155181

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 19:19:09 +08:00
Andy Green
b39c22fc38 issue 352 clang is like gcc for cmake purposes
After ohauer

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 18:52:37 +08:00
Andy Green
c78fe91564 test server h add newline
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-25 12:46:08 +08:00
Andy Green
87eeb0a8bd mbed3 working examples
You need sal-stack-lwip > 1.0.4 with the listen fix

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-25 08:22:08 +08:00
Andy Green
1c6e7bffb7 ssl treat WANT_READ and WRITE separately
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-24 16:54:55 +08:00
Andy Green
ae7b27c77a clean out mbed3 lwip hacks
this upstream mbed patch on sal-stack-lwip sorts the listen probs

a8adf15739.patch

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-24 16:07:18 +08:00
Andy Green
0a05792d8d http post zero content length
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-20 19:31:57 +08:00
Andy Green
c0b0c3d1e2 return AWAITING_TIMEOUT to 5s
Debugging MBED set it to 20 for a few days

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-20 18:52:48 +08:00
Andy Green
b7fed3532a test server pthreads
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-20 09:51:42 +08:00
Andy Green
5a3b1d307b CALLBACK_LOCK_POLL use len to differentiate locking on pollfd change
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-20 09:51:18 +08:00
Andy Green
adf9059d82 windows crappy tools dont know __func__
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-19 17:14:35 +08:00
Andy Green
eb15ea0198 refactor test server
Split test-server into four C files and a header

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-19 13:55:47 +08:00
Andy Green
9494c66d20 win remove piggybacked hack
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-19 08:43:51 +08:00
Andy Green
f2280d6ce7 proxy auth fix
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-18 19:32:01 +08:00
Andy Green
d55ac45c39 windows eliminate duplicate POLLOUT
After "hotcookie" on github

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-18 09:51:07 +08:00
Andy Green
0779964ec1 test echo initial delay
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-17 09:30:36 +08:00
Andy Green
649f602a18 close actually close after send close ack
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-15 10:28:45 +08:00
Andy Green
974bed41b8 test html add open close buttons
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-15 09:24:25 +08:00
Andy Green
bdaa86ff3c README.build.md add mbed3 build info
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:47:42 +08:00
Andy Green
758d97fa10 update appveyor to get win openssl from own server
slproweb is down

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:33:21 +08:00
Andy Green
11f27345d2 mbed3 workable plus or minus mbed3 net stack bug
https://github.com/ARMmbed/sockets/issues/35

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:33:21 +08:00
Andy Green
8c0d3c035c mbed3 plat
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:31:59 +08:00
Andy Green
2cd3074746 mbed3 warning cleaning
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:31:01 +08:00
Andy Green
3b19386b10 introduce lws_sockfd_type
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 16:30:37 +08:00
Andy Green
5f2a8155f1 mbed3 build support
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 15:01:37 +08:00
Andy Green
618b7b75ac mbed3 add yotta JSON
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 15:01:37 +08:00
Andy Green
fc772ccc00 win use platform invalid socket api elsewhere too
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 13:48:58 +08:00
Andy Green
c53f7cad97 win client use platform invalid socket
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 07:35:27 +08:00
Andy Green
35fef0534b plat win be robust against NULL wsi_from_fd 3
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 07:02:38 +08:00
Andy Green
1064cd7619 plat win be robust against NULL wsi_from_fd 2
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-13 11:43:53 +08:00
Andy Green
46d9b8e06f plat win be robust against NULL wsi_from_fd
After "haitetra"

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-13 10:14:50 +08:00
Andy Green
9ffb42efec cmake force internal SHA1 if no ssl
https://github.com/warmcat/libwebsockets/issues/342

You have to explicitly disable LWS_WITHOUT_BUILTIN_SHA1 Cmake option
alomg with SSL to disable SSL

cmake .. -DLWS_WITH_SSL=OFF -DLWS_WITHOUT_BUILTIN_SHA1=OFF

This makes that implicit with disabling SSL.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-09 04:24:46 +08:00
Andy Green
6e405565f5 proxy auth
Simplifies proxy code to use the existing libwebsocket_set_proxy.

Enables libwebsocket_set_proxy() to parse username:password@ at front of
servername in both http_proxy and info->http_proxy_address.

If given the base64 version of the credentials are sent in the CONNECT
header to the proxy.

Port is now taken from info->http_proxy_address server:port syntax, but if
a port is given in the now deprecated info->http_proxy_port (ie, is nonzero)
then it is allowed to be missed out and the info port used instead for
backwards compatibility.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-08 10:15:01 +08:00
Andrejs Hanins
140ac6e9cb Subject: [PATCH] Fix for close ack sending
It was forgotten in two places that pending close ack should be
processed when wsi state is WSI_STATE_RETURNED_CLOSE_ALREADY, but
not WSI_STATE_ESTABLISHED. As a result, close ack wasn't sent out
to the peer.
2015-11-07 07:04:46 +08:00
Andy Green
79a3c5d425 non ssl on ssl port zero recv ambiguous
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-06 08:23:05 +08:00
Andy Green
cc64fb535b non ssl on ssl port fixes
As found by 'github user 7'

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-31 06:49:05 +08:00
Joakim Söderberg
a42ac7b1fb Update README.build.md 2015-10-30 00:27:57 +01:00
Stephan Eberle
b820e2c2cc Implemented fixes allowing libwebsockets to be built under Windows using MinGM/MSYS
Improvemed patches to address travis and appveyor build errors

Reduced WINVER and _WIN32_WINNT to 0x0501 to be less restrictive

Refined CMakeLists.txt to allow for normal Windows and MinGW-specific OpenSSL certificate generation

Simplified include path to gettimeofday.h

Removed unnecessary list(APPEND LWS_LIBRARIES zlib_internal) export

Added back #include <windows.h> to gettimeofday.c to fix build for normal Windows

Made sure that pollfd gets defined on libwebsockets side when _WIN32_WINNT < 0x0600

Made sure that WINVER and _WIN32_WINNT don't get overridden by libwebsockets headers when already set to something greater than 0x0501

Added missing declaration of WSAPoll function for WINVER < 0x0600 in libwebsockets.h, eliminated invalid usages of pollfd instead of libwebsocket_pollfd in test-server.c

Cleaned up duplicate content in gettimeofday.c, removed header inclusions from gettimeofday.h and fixed include order in test-echo.c, test-ping.c and test-server.c to enable build with normal Windows and MinGW

Re-enabled debug_level in test-echo.c and made sure that the call to lws_set_log_level() is also active under Windows (just like in test-server.c); replaced all WIN32 occurrences by _WIN32 in test-echo.c, test-ping.c, and test-server.c

Removed build-msys.sh and added new section about how to build libwebsockets using MinGW to README.build.md
2015-10-30 00:16:40 +01:00
Krishnaraj R Bhat
1662c624ef Define getdtablesize() for android
getdtablesize() has been removed from headers since android-21.
Its value was 1024 in previous android api levels
2015-10-28 21:02:31 +05:30
Andy Green
0c8a8541c6 client only one error callback
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-28 19:50:41 +08:00
Andy Green
1b42913808 update appveyor status decal url
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-28 08:55:01 +08:00
Andy Green
ab620ffde3 release v1.5
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-28 08:39:09 +08:00
Andy Green
c6f95d3f27 keepalive close file when send completes dont wait for wsi close processing
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-27 07:07:14 +08:00
Andy Green
29ddc84a5c check errno for ssl non ssl
After thomgree

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-22 20:32:55 +08:00
Alexander Lukichev
fe6030a62b Make LWS_SEND_BUFFER_PRE_PADDING preprocessor if-friendly
Commit 173e9c4e made LWS_SEND_BUFFER_SIZE a multiple of a certain
value returned by _LWS_PAD_SIZE macro. This macro expanded to
"sizeof(void *)" on non-x86_64 architectures, which made it
unsuitable to use LWS_SEND_BUFFER_SIZE in preprocessor #if
expressions in the library user code.

This patch preserves the padding logic since commit 173e9c4e but
makes it more preprocessor-friendly for applications using
libwebsockets by setting _LWS_PAD_SIZE to the size of "void *"
determined by cmake when libwebsockets is configured for the
target platform.

Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
2015-10-21 12:52:15 +02:00
Andy Green
2721e3ca9d qualify server specific api with LWS_NO_SERVER
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-21 09:23:21 +08:00
Andy Green
2627148523 keepalive fix flow now forced closed removed
Since 0d89f3cbed added recently,
http1.1 keepalive tries to actually keep alive.

Some updates are needed to keepalive flow to solve problems coming from
changes that were hidden until now by keepalive basically closing until
recently.  It's not very noticable since clients will retry as close is
the default 1.0 behaviour... anyway this lets me do

wget http://localhost:7681/test.html http://localhost:7681/test.html

using keepalive correctly on the test server.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-21 08:16:34 +08:00
Andy Green
d256194a0c document context create cannot execute in parallel
Reported by Ash 20001 <ash20001@hotmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-20 12:24:00 +08:00
Ash 20001
0d89f3cbed detect http1 close connection header properly 2015-10-20 12:12:12 +08:00
Andy Green
b5cf69fdb5 correct error handling path in client handshake
After Vikas Gahlan

http://ml.libwebsockets.org/pipermail/libwebsockets/2015-October/001955.html

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-18 18:51:36 +08:00