libwebsockets/lib
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
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
alloc.c Subject: [PATCH] Add custom allocator support using the realloc() interface 2014-12-05 07:25:24 +08:00
base64-decode.c b64decode correct decode of some strings 2016-03-19 07:43:22 +08:00
client-handshake.c fixup! ipv6 move disable to vhost option 2016-06-04 08:37:19 +08:00
client-parser.c replace LWS_MAX_SOCKET_IO_BUF with context creation info pt_serv_buf_size 2016-05-19 12:34:35 +08:00
client.c fix for https connection code 2016-06-14 12:04:34 +08:00
context.c vhost creation print ipv6 2016-06-04 08:37:31 +08:00
daemonize.c Revert changes in daemonize.c from commit 22d6f39e7f 2016-06-02 13:00:13 +08:00
extension-permessage-deflate.c replace LWS_MAX_SOCKET_IO_BUF with context creation info pt_serv_buf_size 2016-05-19 12:34:35 +08:00
extension-permessage-deflate.h extension permessage deflate 2016-01-11 11:34:01 +08:00
extension.c extensions add api for user code option manipulation 2016-04-08 09:45:49 +08:00
getifaddrs.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
getifaddrs.h Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
handshake.c asserts log which 2016-05-13 10:27:48 +08:00
header.c replace LWS_MAX_SOCKET_IO_BUF with context creation info pt_serv_buf_size 2016-05-19 12:34:35 +08:00
hpack.c http2 update integration 2016-04-13 11:53:40 +08:00
http2.c http2 handle error path on ensure_user_space 2016-04-23 09:36:18 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lejp-conf.c openssl allow set clear of ssl options from info 2016-06-10 11:09:27 +08:00
lejp.c lejp check callback errors and use reject path 2016-05-17 21:22:06 +08:00
lejp.h lejp string chunk 255 2016-05-17 21:27:24 +08:00
lextable-strings.h http2 update integration 2016-04-13 11:53:40 +08:00
lextable.h http2 update integration 2016-04-13 11:53:40 +08:00
libev.c plugins 2016-04-07 09:38:08 +08:00
libuv.c windows adapt plugin name format vs functions 2016-05-25 21:44:30 +08:00
libwebsockets.c introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
libwebsockets.h introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
lws-plat-mbed3.c mbed align with pt changes 2016-01-20 17:35:18 +08:00
lws-plat-mbed3.cpp mbed align with pt changes 2016-01-20 17:35:18 +08:00
lws-plat-unix.c libuv fixes for foreign loop test 2016-05-04 08:40:46 +08:00
lws-plat-win.c windows call plugins init on win32 plat 2016-05-25 19:43:02 +08:00
minihuf.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
minilex.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
output.c lws_write escalate pending truncated to make the 2016-06-07 16:46:41 +08:00
parsers.c add max_http_header_data2 and upgrade internal offsets from short to int 2016-06-02 13:03:35 +08:00
pollfd.c vh doubly linked list for wsi on same protocol 2016-04-16 08:40:35 +08:00
private-libwebsockets.h fixup! ipv6 move disable to vhost option 2016-06-04 08:37:08 +08:00
rewrite.c check oom on lws_malloc 2016-05-12 21:04:33 +08:00
server-handshake.c replace LWS_MAX_SOCKET_IO_BUF with context creation info pt_serv_buf_size 2016-05-19 12:34:35 +08:00
server.c introduce urlencode decode and sql escape public apis 2016-06-14 12:04:38 +08:00
service.c avoid illegal sockfd on timeout 2016-06-04 09:02:09 +08:00
sha-1.c polarssl implementation 2016-04-18 20:05:43 +08:00
smtp.c smtp 2016-06-07 09:49:59 +08:00
ssl-client.c lws_ssl_client_connect2 remove duplicate close on error path 2016-05-19 17:27:15 +08:00
ssl-http2.c http2 update integration 2016-04-13 11:53:40 +08:00
ssl-server.c openssl allow set clear of ssl options from info 2016-06-10 11:09:27 +08:00
ssl.c replace LWS_MAX_SOCKET_IO_BUF with context creation info pt_serv_buf_size 2016-05-19 12:34:35 +08:00