mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
![]() 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> |
||
---|---|---|
.. | ||
android | ||
.gitignore | ||
attack.sh | ||
favicon.ico | ||
fuzxy.c | ||
leaf.jpg | ||
libwebsockets-test-server.service | ||
libwebsockets.org-logo.png | ||
lws-cgi-test.sh | ||
test-client.c | ||
test-echo.c | ||
test-fraggle.c | ||
test-ping.c | ||
test-server-dumb-increment.c | ||
test-server-echogen.c | ||
test-server-http.c | ||
test-server-libev.c | ||
test-server-libuv.c | ||
test-server-mirror.c | ||
test-server-pthreads.c | ||
test-server-status.c | ||
test-server-v2.0.c | ||
test-server.c | ||
test-server.h | ||
test.html |