Commit graph

35 commits

Author SHA1 Message Date
Andy Green
6f11c1361a lws-meta 2017-07-19 08:59:42 +08:00
Andy Green
6f2a470ee2 test-html: unify ws open function 2017-07-14 10:26:39 +08:00
Andy Green
05d74e45dc mirror: multiple mirror contexts by mirror= url arg
By default mirror acts the same as before.

However if you access the test server with a url containing "?mirror=<name>", the session will bind to
a mirror instance private to "?mirror=<name>".  Only sessions that used the same 'mirror=' name can
share the drawings, mirror instances with a different name (including the default "" name) are unaffected.
2017-07-08 16:03:40 +08:00
Andy Green
d58353f98a 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
2017-03-26 10:19:34 +08:00
Andy Green
9287f7d1b3 ext: pmd: improve dealing with partial input usage with drain
https://github.com/warmcat/libwebsockets/issues/841
2017-03-20 19:07:19 +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
Andy Green
a5ec7212ff test html: js date uses ms 2016-08-23 18:29:17 +08:00
Andy Green
7acf76cd3d esp8266 initial support 2016-08-10 21:20:23 +08:00
Andy Green
2671b7469a plugins-dim-webpage-when-connection-lost 2016-07-14 08:57:28 +08:00
Andy Green
c55fd27d75 introduce urlencode decode and sql escape public apis
This adds

 - simple lws_urlencode()
 - simple lws_urldecode()
 - simple lws_sql_purify

Those expect the data to all be there and process it up until
the first '\0'.

There is also a larger opaque apis for handling POST_BODY urldecode.  To
enable these, you need to give cmake -DLWS_WITH_STATEFUL_URLDECODE=1 (or
arrange any larger feature that relies on it sets that in CMakeLists.txt)

 - stateful urldecode with parameter array

These have create / process / destroy semantics on a struct that maintains
decode state.

Stateful urldecode is capable of dealing with large POST data in multiple
POST_BODY callbacks cleanly, eg, file transfer by POST.

Stateful urldecode with parameter array wraps the above with a canned
callback that stores the urldecoded data and indexes them in a pointer
array matching an array of parameter names.

You may also pass it an optional callback when creating it, that will recieve
uploaded file content.

The test html is updated to support both urlencoded and multipart forms,
with some javascript to do clientside validation of an arbitrary 100KB
file size limit (there is no file size limit in the apis).

Signed-off-by: Andy Green <andy@warmcat.com>
2016-06-14 12:04:38 +08:00
Andy Green
f79534e0a4 post example in test server
https://github.com/warmcat/libwebsockets/issues/501

This demonstrates how to do a 303 redirect on POST and provide
the results there, in both libwebsockets-test-server and the
plugin version.

Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-25 10:04:49 +08:00
Andy Green
d459a6fadc lwsws redirect and correct vhost selection before accept
Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-08 18:38:06 +08:00
Andy Green
1c428c3154 test server align rxbuf with permessage deflate rx buf size
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-04-01 08:47:05 +08:00
Andy Green
0ad1a6e5bf test server add lws_status
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-21 11:09:40 +08:00
Andy Green
aa85024f9a test html add tabs
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-21 11:07:22 +08:00
Andy Green
ce0326b839 libwebsockets.org url updates
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-02-21 10:42:46 +08:00
Andy Green
6711266a50 extension permessage deflate
Signed-off-by: Andy Green <andy.green@linaro.org>
2016-01-11 11:34:01 +08:00
Andy Green
1fb95e8084 close add api to control sent close frame contents
This adds an api lws_close_reason() which lets you control what will
be sent in the close frame when the connection is closed by returning
nonzero from the user callback.

The test server demo is extended to prove it works in both directions.

With this, we should have nice close support.

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-26 17:20:34 +08:00
Andy Green
066a7a1801 close add callback to get peer close reason
https://github.com/warmcat/libwebsockets/issues/196

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-26 15:47:06 +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
John Harrison
8d5793bc16 ie10 lws url workaround
Signed-off-by: John Harrison <john@h-agtec.com>
2013-12-10 21:20:03 +08:00
Andy Green
fbf48227b3 add by hand http send example
This adds a demonstration of how to use the http nonblocking
send action to the test server.

If you ask for /leaf.jpg from the test server, it will send
"by hand" a 2.4MB jpeg in HTTP, including the headers.  See
the test server sources to see how it is done.

Although it's a file, and a jpeg image, actually the exact
same scheme will work for any data or mime type.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-14 23:24:07 +08:00
Andy Green
c51823a418 renovate test html
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-31 19:50:57 +08:00
Andy Green
fab033dd4f add logo to test file
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-16 10:11:34 +08:00
David Galeano
b42dcc7186 Use feature check rather than browser check. 2013-01-09 15:39:50 +08:00
Andy Green
86e82ab22f update test html now mozilla uses normal ws apis
Signed-off-by: Andy Green <andy.green@linaro.org>
2012-05-03 12:48:14 +08:00
Andy Green
188d896c81 test html uplevel detect browser and MozWebSocket
Signed-off-by: Andy Green <andy@warmcat.com>
2011-09-25 10:01:02 +01:00
Andy Green
90c7cbcc00 introduce-ssl-client-connections--flow-control.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 06:26:52 +00:00
Andy Green
24cc0aea16 fix-script-to-synthesize-websocket-url-entirely-from-script-url.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-15 19:39:30 +00:00
Andy Green
5195968224 mirror-protocol-chrome-and-firefox.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-12 14:12:13 +00:00
Andy Green
fe2a0d2e88 introduce-mirror-test-protocol.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-12 13:10:40 +00:00
Andy Green
ab7d933d9d test-applet-add-reset-button-and-colour-socket-status.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-11 13:19:19 +00:00
Andy Green
462bbf711e require-specific-test-protocol.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-11 12:52:28 +00:00
Andy Green
3faa9c716c add-wss-ssl-openssl-support.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 17:03:03 +00:00
Andy Green
7310e9c77b refactor-into-dirs.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-01 09:12:17 +00:00
Renamed from test.html (Browse further)