Hi Kevin
I have further information about serving the demo web pages from the SD card. This is valid when working with the simulator or working on the target.
In addition to the fact that the web pages designed for the uFileSystem may not be fully compatible for running from the web page -
only true when working with large-granularity system or when the start page is not set correctly as the start page from the SD card - there is another detail which needs to be corrected.
For example, when refreshing a web page by clicking on a refresh button this causes a GET to be sent to the web server with the following (example) information:
http://192.168.0.3/9I_O.htm?r=RefreshThis is performing a GET of the file
9I_O.htm and sending additional parameters which are interpreted, in this case simply as a refresh but in other cases sending new parameters. A problem that I found was that the SD card case was making a mistake in trying to find a file on the card called "
9I_O.htm?r=Refresh". This of course fails since there is no such file and a file with such an extension is obviously not possible.
The fault is in the routine
extern CHAR *fnWebStrcpy(CHAR *cStrOut, CHAR *cStrIn) in
webutils.c which is parsing the file name after the parameters have been handled. It is performing various conversions needed when sending file names to the web server but not recognising the '
?' as a terminator. Since a '
?' is not allowed in a file name I believe that this should always be interpreted as a terminator and so a change will cause no problems.
The change is (in
extern CHAR *fnWebStrcpy(CHAR *cStrOut, CHAR *cStrIn))
else if (*cStrIn <= '&') {to
else if ((*cStrIn <= '&') || (*cStrIn == '?')) {This then allows parameter passing to operate correctly without causing the web server to not find the file on the SD card that is to be displayed.
Regards
Mark