1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/plugins
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
..
lwsws-logo.png http cache policy 2016-04-22 08:53:49 +08:00
protocol_client_loopback_test.c plugins add win modifiers before libwebsockets.h for dll export flag 2016-05-26 07:52:20 +08:00
protocol_dumb_increment.c plugins add win modifiers before libwebsockets.h for dll export flag 2016-05-26 07:52:20 +08:00
protocol_lws_mirror.c plugins add win modifiers before libwebsockets.h for dll export flag 2016-05-26 07:52:20 +08:00
protocol_lws_server_status.c plugins add win modifiers before libwebsockets.h for dll export flag 2016-05-26 07:52:20 +08:00
protocol_lws_status.c plugins add win modifiers before libwebsockets.h for dll export flag 2016-05-26 07:52:20 +08:00
protocol_post_demo.c introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
server-status.html server status add getloadavg and lib version and more css 2016-04-26 14:54:09 +08:00