We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I want to use the HTTP-Webserver with the flashfilesystem of the Realview RTL. The webserver should read all files from the flashfilesystem. Therefore I added the http_uif.c file to the project.
I can retrieve normal *.htm files with the help of the webbrowser, but any dynamic content like CGI-Files are not accessible by the webserver. When I doubleklick on a link to a CGI-File, I see the file not found page. At the same moment the output of the debug version of RTL libary states "HTTP_ERR: File not found, session 0".
I already added some additional debug outputs to the http_uif.c file to see which files are opened by the HTTP-Server. So I recognized that the HTML- and GIF-Files are open through the interface provided by http_uif.c, but the CGI-files aren't.
Whats the reason for this? Is there an option to change this behavior?
I'm using RL-ARM 3.10 RL-MDK 3.11.
Rainer
Rainer, you are in right! CGI feature is hard to use, CGI files can't edit with standard WEB editor.
My approach for embedded WEB server is different, I use token replacement in HTML code. Every token begin with escape char ($ in my implementation), and ending with space. Tokens are inserted in HTML text, and filesystem Read function replace it with actual value of variable.
Tokens are stored in constant table with record structure:
typedef struct { char name[10]; // char format[10]; // for sprint void *address; char type; // enum for: char int, float.. float LLim, ULim, Def; // upper, lower and default value } TParamTable;
I hope this is about you think.
Georg