Hi all, I'm using RL-TCPnet HTTP server to serve some dynamic pages. I notice a problem with the "i" command of the internal cgi scripting language. This is supposed to include some html code from a file on the virtual filesystem. As a testbench I'm using the sample files from Keil's HTTP demo: tcp.cgi script with tcp_header.inc and tcp_footer.inc as included files.
What I see is that, after processing a few times a script line with the mentioned inclusion command, the server gets unable to open the included file anymore (an HTTP 404 is returned to the browser). Since for my application I had to re-define filesystem primitives by including HTTP_uif.c in my project, I suspected my primitives where failing. In fact they appear to work fine with the exception of the case they are called by the script interpreter.
Another interesting point is that my primitives implement a simple filesystem that uses an open files table of maximum fixed size. The server appears to fail exacly when the number of inclusion commands processed reaches che open files table maximum size.
Is it possible that the code handling the inclusion command is not closing the file after inclusion by calling a fclose()? This would explain the behaviour I see. Otherwise... Anyone there have an idea why this could occur?
TIA Andrea