1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/http-server/minimal-http-server-form-get
Andy Green 24abd699f6 http: parser: straighten out %00 legality
https://github.com/warmcat/libwebsockets/issues/2262

This adds a README explaining what can be expected if your URLs contain
%00, and adds a safe helper for urlargs-by-name that is length-based.

Contains fix for extra NUL on some headers

https://github.com/warmcat/libwebsockets/issues/2267
2021-04-10 09:21:33 +01:00
..
mount-origin lws logo: update minimal examples 2020-03-06 04:46:39 +00:00
CMakeLists.txt cmake: latest cmake shows dep warnings for scripts < 2.8.12 2020-12-06 19:44:54 +00:00
minimal-http-server-form-get.c http: parser: straighten out %00 legality 2021-04-10 09:21:33 +01:00
README.md minimal-http-server-form-get 2018-04-06 10:38:03 +08:00

lws minimal http server form GET

build

 $ cmake . && make

usage

 $ ./lws-minimal-http-server-form-get
[2018/03/29 08:29:41:7044] USER: LWS minimal http server form GET | visit http://localhost:7681
[2018/03/29 08:29:41:7044] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 off
[2018/03/29 08:29:49:8601] USER: text1: (len 4) 'xxxx'
[2018/03/29 08:29:49:8601] USER: send: (len 6) 'Submit'

Visit http://localhost:7681, submit the form.

The form parameters are dumped to the log and you are redirected to a different page.