1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/test-server
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
..
android Android: update to use SDK Python script 2016-06-07 02:42:32 +08:00
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
attack.sh fix %3d handling in path part and add attack.sh 2016-05-07 08:31:33 +08:00
favicon.ico refactor-into-dirs.patch 2010-11-01 09:12:17 +00:00
fuzxy.c Don't include <sys/cdefs.h> for NetBSD 2016-02-27 10:30:59 +08:00
leaf.jpg add by hand http send example 2013-02-14 23:24:07 +08:00
libwebsockets-test-server.service test server example systemd service file 2016-02-19 12:46:36 +08:00
libwebsockets.org-logo.png add libwebsockets.org logo to share 2013-01-16 10:00:39 +08:00
lws-cgi-test.sh cgi post 2016-04-13 11:53:40 +08:00
test-client.c client fix reaction to tls failure 2016-05-03 07:26:10 +08:00
test-echo.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-fraggle.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-ping.c LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable 2016-03-23 09:22:11 +08:00
test-server-dumb-increment.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-echogen.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-http.c introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
test-server-libev.c polarssl implementation 2016-04-18 20:05:43 +08:00
test-server-libuv.c libuv fixes for foreign loop test 2016-05-04 08:40:46 +08:00
test-server-mirror.c license clarification and test apps CC zero 2016-02-08 08:44:21 +08:00
test-server-pthreads.c polarssl implementation 2016-04-18 20:05:43 +08:00
test-server-status.c win32 needs strange strftime args 2016-04-05 19:15:34 +08:00
test-server-v2.0.c win fix warnings from appveyor 2016-05-15 08:31:01 +08:00
test-server.c coverity 160160/160161 test server commanline args strncpy NUL management 2016-04-23 07:21:48 +08:00
test-server.h introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
test.html introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00