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 that calls a CGI function.
CGI functions are not called on-the-fly. It just does not work.
I have now moved to THTTP...and although it serves my pages nicely, I
can't get ssi or other cgi functions to work: so yet more day after day
after day of trying to reverse engineer stuff to find that magic
incantation. Grrr.
FYI thttp example doesn't work either (using BINFS not NXFLAT)
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