Commit graph

219 commits

Author SHA1 Message Date
Andy Green
edd3a2d6bb test server http dont print junk if string too long
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-01-20 09:12:31 +08:00
Peter Pentchev
91fe5aa64f Use bash as a script interpreter
The test-server/attack.sh script makes use of several features only
available in the Bash shell, so mark it accordingly.
2015-10-15 11:47:38 +08:00
Roger A. Light
7a474b4e2d Separate private defines in lws_config_private.h
So we don't expose all HAVE_ macros and such to the world.
2015-10-12 10:10:20 +08:00
wonder-mice
41802c7a98 From 04da2ccd1e8c5b582c4e2a77ee53f929ae8f22a0 Mon Sep 17 00:00:00 2001
Subject: [PATCH] Always include lws_config.h since now we have only CMake
 build
2015-04-23 06:10:51 +08:00
Andy Green
15ac07f1a0 test echo put proper origin
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-04-07 07:52:23 +08:00
Andy Green
16fb0132ce prepare for v1.4
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-03-28 11:35:40 +08:00
Andy Green
7d62eb066e test server only mention pollfd if EXTERNAL_POLL
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-03-05 17:06:16 +08:00
Andy Green
6d91d5f8a1 test ping correct type for fprintf
Reported-by: Michael Habeler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-12-02 08:42:47 +08:00
Andy Green
613bc32f73 test echo unbreak no server
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-12-01 22:16:17 +08:00
Andy Green
303f65fbe2 test echo versa + uri
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-12-01 21:46:35 +08:00
Andy Green
fb8f2b0a73 test echo add port to server host
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-12-01 21:02:55 +08:00
Andy Green
453a9b34fd coverity 83669 remove random from fraggle
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 13:55:40 +08:00
Andy Green
cbd98ed1e4 coverity 83663 remove random from test client
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 13:53:19 +08:00
Andy Green
b743623ff4 coverity 83683 test ping more uint64_t needed
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 13:37:23 +08:00
Andy Green
d7b0a72953 coverity 83658 test server check fstat return
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 13:10:26 +08:00
Andy Green
b17598bea2 coverity 83662 test server check lseek return
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 13:10:26 +08:00
Andy Green
0f59c9e75c coverity 83668 test echo nesting level bug
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 12:50:12 +08:00
Andy Green
6a33759bb1 83675 test echo param could bust bounds
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 12:42:14 +08:00
Andy Green
31fc6ff5b5 coverity 83682 suspicous signed bytewise reassembly
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 12:27:47 +08:00
Andy Green
56686d784c coverity 83683 shift greater than 31 technically undefined
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 12:25:36 +08:00
Andy Green
745a69e7ce test echo initialize listen port
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-26 14:36:17 +08:00
Andy Green
ba4e415006 clean test server a bit
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-26 12:04:29 +08:00
Joakim Soderberg
bf3e8a998e Subject: [PATCH] BUGFIX: Failed to get proper output dir for test-server
When creating the directory where to put the files needed by the test-server CMake would fail because it tried to create the directory /../share/libwebsockets-test-server, which is not possible. This happens since the TARGET_FILE_DIR for the test-server is not fetched properly.

Also mentioned in this trac ticket:
http://libwebsockets.org/trac/libwebsockets/ticket/84
2014-11-25 05:49:11 +08:00
Andy Green
752963da00 test-echo: enable for ssl cert serving and verification 2014-11-18 09:28:35 +08:00
Andy Green
5db6c0fa01 clean http2 passphrase code
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-05 15:32:58 +08:00
Andy Green
7df53c5550 http2 alpn npn pollout
This adds npn / alpn support if your openssl can handle it.
Then, browsers that understand alpn will by default
negotiate http/1.1 and work as normal.

Clients that understand http2.0 can negotiate h2-14 and
use the basic but working http2.0 support automatically

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-22 15:38:12 +08:00
Andy Green
200f385716 http2 track content length add END_STREAM
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-18 12:23:05 +08:00
Andy Green
91b0589795 http2 handle flags
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-17 09:33:16 +08:00
Andy Green
917f43ab82 http2 able to send test.html to nghttp2
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-12 14:31:47 +08:00
Andy Green
2add6340d5 http2 hpack basic decode ok including huff
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-12 08:38:16 +08:00
Andy Green
024eb6c80c http2 can keep upgraded connection up
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-08 12:00:53 +08:00
Andy Green
a54f232f07 http2 add h2c upgrade and http2 connmode
Connection upgrade handling for h2c
Establish http2 union struct and http2 connmode
No protocol code yet

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-09-30 09:43:14 +08:00
Andy Green
1ee42a5f05 add http2 settings token
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-09-30 08:27:29 +08:00
Andy Green
9887bdb438 test server correct header naming order
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-09-30 08:23:06 +08:00
Andy Green
14425eae4e introduce lws_partial_buffered
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-08-18 22:49:39 +08:00
Andy Green
7a8d86e048 handle client protocol lists properly
We fail to deal with lists of protocols sent by the client
by picking one from the list properly.  This fixes that and
adds protocol lists to the test client for regression testing.

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-07-19 06:52:39 +08:00
Andy Green
6aa4f65620 test server dumb increment fix once per second duplicate
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-07-06 09:36:44 +08:00
Andy Green
a717df2739 refactor libev eliminate all code ifdefs
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-11 13:14:37 +08:00
Andy Green
c5d3ed328b test server extend timeout while sending leaf
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 11:11:06 +08:00
Andy Green
158e804cb7 refactor out WIN32 tests from code
This gets rid of all the platform-dependent #ifdef stuff and
migrates it into the new lws-plat-xxx.c files.

These are then included in a one-time test in libwebsockets.c
according basically to Windows or not.

The idea is from now on, all Windows-specific code should go in
lws-plat-win.c, where any kind of Windows perversion like DWORD
is fine.

Any new functions going in there should be named lws_plat_...
and be defined in all the lws-plat-xxx.c file (currently just
win32 and unix platforms are supported).

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 14:25:10 +08:00
Patrick Gansterer
462c981e9c Move #define for random() into the test applications where needed 2014-03-29 08:05:07 +01:00
Patrick Gansterer
60cbbac880 Use Sleep() instead of usleep() on Windows 2014-03-29 07:52:01 +01:00
Patrick Gansterer
fc5734c339 Remove dummy headers for Windows 2014-03-29 07:43:38 +01:00
Patrick Gansterer
8df031d336 Remove emulated_poll on Windows 2014-03-29 07:15:40 +01:00
Patrick Gansterer
1ee57f6fe8 Add libwebsocket_cancel_service() to let a pending libwebsocket_service() return
Use poll() with a pipe instead of ppoll() to allow the stop polling
on all UNIX platforms.
2014-03-08 09:31:49 +08:00
Michael Haberler
099645dc05 update test server for new extpoll 2014-02-15 20:35:05 +08:00
Jakob Flierl
af8694d203 make force_exit volatile.
Instruct the compiler to always access force_exit in memory.
2014-02-15 13:51:16 +08:00
martell
19c73f3bed fixed windows build 2014-02-15 13:34:25 +08:00
Andy Green
3b3fa9e208 Use ppoll to allow signals to wake service loop early on change of pollfd event
To enable this code you need to force LWS_HAS_PPOLL to de defined.

#defining it at the top of libwebsockets.c is enough.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-12-25 16:34:37 +08:00
Andy Green
7a1327977a add locking callback for fds
This adds two new callbacks in protocols[0] that are optional for allowing limited thread
access to libwebsockets, LWS_CALLBACK_LOCK_POLL and LWS_CALLBACK_UNLOCK_POLL.

If you use them, they protect internal and external poll list changes, but if you want to use
external thread access to libwebsocket_callback_on_writable() you have to implement your
locking here even if you don't use external poll support.

If you will use another thread for this, take a lot of care about managing your list of
live wsi by doing it from ESTABLISHED and CLOSED callbacks (with your own locking).

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-12-18 09:48:26 +08:00