Re: uIP Webserver - CGI help needed

2025-06-27 Thread Tim Hardisty
Thanks Michael! Looks like libwebsockets *is* ported to NuttX already - but you have to enable MIT licensed software (and a few other things to do with TLS and CRYPTO stuff) first, but it could well be an option: I'll take a look :-) In the meantime I have a theory as to why the thttp CGI scr

Re: uIP Webserver - CGI help needed

2025-06-26 Thread Michael Jung
Hi Tim, you wrote: > Anyone know of a lightweight webserver that will handle POST and that runs under NuttX? I was very impressed by libwebsockets, when I was using it on NuttX a couple of years ago. It is not exactly lightweight, and much more than a webserver, but it is a perfect infrastructure

Re: uIP Webserver - CGI help needed

2025-06-26 Thread Tim Hardisty
Update as I am back on this after a break and still stumped. uIP: * only supports GET method * HTML5 maps PUT to GET which is why I found either caused my CGI app to run * But no support for getting the data itself as...it only supports the GET method thttpd: * supports POST, and cal

Re: uIP Webserver - CGI help needed

2025-06-05 Thread Tim Hardisty
Make that "PUT" not "GET", of course. On 05/06/2025 15:42, Tim Hardisty wrote: And...the magic answer to make this form actually work with the uIP webserver is that:  1.  the form's "method" has to be GET not POST otherwise the URL CGI    "call" is not made visible/sent correctly/processed. 2.

Re: uIP Webserver - CGI help needed

2025-06-05 Thread Tim Hardisty
And...the magic answer to make this form actually work with the uIP webserver is that: 1.  the form's "method" has to be GET not POST otherwise the URL CGI "call" is not made visible/sent correctly/processed. 2. the webserver has to be configured with URL/CGI mapping enabled (CONFIG_NETUT

Re: uIP Webserver - CGI help needed

2025-06-05 Thread Tim Hardisty
Wow - thank you: very helpful indeed :-) On 05/06/2025 11:08, Maciej Wójcik wrote: This is how I implemented REST API with uIP in NuttX some time ago. http.c int format_header(char* buff, int status, int body_len) { if (body_len > 0) {return snprintf(buff, HTTPD_MAX_HEADERLEN, "HTTP/1.0 %

Re: uIP Webserver - CGI help needed

2025-06-05 Thread Maciej Wójcik
This is how I implemented REST API with uIP in NuttX some time ago. http.c int format_header(char* buff, int status, int body_len) { if (body_len > 0) {return snprintf(buff, HTTPD_MAX_HEADERLEN, "HTTP/1.0 %d %s\r\n" "Connection: %s\r\n" "Content-Length: %d\r\n" "%s" "\r\n

Re: uIP Webserver - CGI help needed

2025-06-03 Thread Tim Hardisty
To try and answer my own question... It seems (and probably obvious, doh, to all but me) the uIP server only serves pre-formatted html. No matter what "send" option you choose (pre-formatted/sendfile/mmap) or the URL/CGI mapping option) the html is pre-rendered. So NO chance of a form action t