March 22,1997

FILESYSTEM SUPPORT UPDATE FOR EMBEDDED WEB SERVER

The following new file was added:

ews007.c : filesystem web page handler (needs stdio.h with file system)

The following files were modified. you can grep for the
string "*** NEW ***" to find where the mods were made.

binapp.c        : moved the include of stdio.h from ewsapp.h to here
                  because this file needs it but the others don't

ews.h           : added 2 fields to the em_io_t structure
                  to support the file system root and default page name

ewsapp.h        : added the declaration of the file system handler
                  and changed the names of a couple of preexisting fields.
                  moved the include of sys/stat and stdio.h to the
                  specific files that need them so the whole thing
                  can build without stdio.h if you eliminate the
                  functions that use it

ews006.c        : small but major change here to the rules for
                  finding web pages please compare this file
                  to the previous version.

ewsw95t.c       : added initialization of new fields that were
                  added in ews.h.

The procedure to add this is to take the first distribution without
filesystem support and copy these files over the existing files
that were there. Add ews007.c to your makefile. build it and run it as
before.

Edit ewsw95t.c and find the initialization of system.fileroot
and system.filedefault
and change them to point to somewhere on your filesystem that has
web pages. The filesystem web page handler wants a single virtual root where
web page files and subdirectories with web page files reside. For example
on my system I have c:\webshare\wwwroot as the root of my web pages. I
have c:\webshare\wwwroot\default.html as the page I want to show.
When I access it with my browser, I say
http://hendrix.reno.nv.us/default.html and you get that file.

For targets that don't have a filesystem, all you need to do is
remove the definition of SERVER_FILE_SUPPORT in ews007.c and rebuild
which will change it to an empty function without filesystem
calls. Or, just remove the file and change ews006.c so it doesn't
call app_FileRequest.

