naficgi: HTTP Server Example Application

The files in this directory make up an example HTTP Server
application using the File System and External CGI features in the
Advanced Web Server Library.

The application consists of a single task ('ROOT') which starts the
Advanced Web Server and then suspends itself.  This application
demonstrates the External CGI and File System Stub features of the
Advanced Web Server.  The HTML files in this directory contain the
source for a set of web pages.  The PBUILDER Utility was used to
convert these web pages into C files.  These C files are built into
the application to create a web server.

The web server demonstrates how to upload data from an HTML form (RFC
1867) to the web server, and how to read data from the server using
ExternalCGI and by means of a file system.


Note: Only files with the following extensions are accepted by the
External CGI: *.txt, *.jpg, *.html and *.gif.


All application results are observed using a web browser (e.g.,
Netscape, Internet Explorer).

Three MULTI build files are provided if the option to install Green Hills
support is selected.  The build file project.gpj is used to control how
application specific files are built.  All updates to the build should be
made to this file.  Project.gpj is a subproject to the other build files
image.gpj and rom.gpj.  Image.gpj is used to generate a debuggable version
of the application, and also creates the file image.bin that can be written
into ROM if the bootloader is used.  Rom.gpj is used to generate a 
ROM image of the application if the bootloader is not used.

One GNU make file is provided.  Build the target 'image' to
generate an image that can be debugged with gdb, and the file 
image.bin which can be written to flash if the bootloader is used.
Build the target 'rom.bin' to create the file rom.bin which 
can be written to ROM if the bootloader is not used.

The following files are provided with this application:

appconf.h         sets application configuration settings
.\32b\image.gpj   used to build the big endian Green Hills version of the
                  application.  The build script creates a version that
                  can be debugged with Multi, and the file image.bin 
                  which can be written into a ROM that uses the bootloader.
makefile          Make file for the GNU toolset.
project.gpj       contains application specific build settings
readme            this file
.\32b\rom.gpj     used to build the big endian ROM image of application
root.c            contains applicationStart() function, that creates an
                  application thread
cgi.c             contains application specific CGI stub functions
file.c            contains application specific file stub functions

The following files are generic stubs required by all applications that
use and include the AWS (rphttpd.a) library.  These files are located
in directory .\..\..\..\src\rphttpd\:

security.c      contains the generic stubs used for no security
                requirements

The following files are input/outputs to/from the pbuilder tool,
and are contained in the pbuilder directory:

list.bat        file listing as parameter to pbuilder tool
fileandcgi_v.c  stub file with fleshed out bodies (initially generated
                by the PBUILDER Utility, naked stub originally located
                in the pbuilder\html directory)
pbsetup.txt     PBUILDER Utility options file (do not alter)
rppages.c       PBUILDER Utility output file containing all the
                application Web pages defined in List.bat
rpusrdct.h      PBUILDER Utility output file containing phrase
                dictionary prototypes
rpusrdct.c      PBUILDER Utility output file containing phrase
                dictionary data structures
rpusrdct.txt    PBUILDER Utility input file containing phrase
                dictionary definitions

The following Web content files are contained in the pbuilder\html
directory:

fileandcgi.c    source file generated by PBUILDER Utility
fileandcgi.htm  opening Web Page
formreply.htm   reply page from Form page

In addition, the following files in the BSP directory are built
as part of this application:

reset.s         contains the reset code
appconf_api.c   contains run time access to the application configuration

The application build file links in the following libraries:

bsp.a           contains BSP code
tcpip.a         contains the NET+Works TCP/IP stack
na1.lib         contains public NET+Works utilities
na2.lib         contains the NET+Works API libraries
tx.a            contains the ThreadX kernel
rphttpd.a       contains the NET+Works AWS API library


