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 calls my CGI app where I can save the file that's
sent
* Any calls to puts or printf from within the CGI app fail. There are
pipes in place for stdout but the piped/opened file reports as
unwriteable.
So uIP no use without work; thttpd is broken (issue raised on github)
Anyone know of a lightweight webserver that will handle POST and that
runs under NuttX?
On 05/06/2025 16:50, Tim Hardisty wrote:
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. the webserver has to be configured with URL/CGI mapping enabled
(CONFIG_NETUTILS_CGIPATH)
On 31/05/2025 11:16, Tim Hardisty wrote:
I'm using the netutils uIP webserver to provide a simple interface,
served by my board, for configuration, log downloads, firmware
updates, etc.
Forgive me if the terminology is wrong here, but I am trying to find
documentation - NuttX or elsewhere - about the %! "tag" that denotes
a call to a CGI function. Specifically, I am trying to add a form
that calls a script from a button, where do-firmware-update is my
CGI function:
<form action="%! do-firmware-update" method="post"
enctype="multipart/form-data" accept-charset="UTF-8">
This gets served with nothing after the first opening quote
character on this line so i am assuming I am "calling" the script
incorrectly but can't find anything anywhere to tell me how to do this.
Can anyone point me in the right direction?
Thanks!
TimH
--
Regards,
Tim Hardisty
A picture containing text, clipart Description automatically generated
+44 (0) 1305 534535
<http://www.jti.uk.com/>
JTi.uk.com <https://www.jti.uk.com/>
<https://www.facebook.com/JTinnovations/>
\JTinnovations <https://www.facebook.com/JTinnovations/>
JT Innovations Ltd.
Registered office: 36 East St, Weymouth, Dorset, DT3 4DT, UK.
Company number 7619086
VAT Registration GB 111 7906 35