Since its first public release, Nut/OS offers a HTTP library, which simplifies the development of embedded webserver applications.
The MicroHTTP library (uhttplib) has been introduced in Nut/OS 5.0 and will replace the original HTTPD library, which was the first HTTP support in Nut/OS. The problem with this early library is, that you cannot add new features without modifying the code in the source tree. The main feature of the new MicroHTTP library is, that new features can be added by application code, without the need to modify the original sources.
Another great feature of the new library is, that it had been created for portability. The old library was done for Nut/OS exclusively. Porting it to another operating system wouldn't be trivial and, as far as I know, never had been done. The new MicroHTTP library had been developed on a Windows PC using Microsoft's Visual Studio and was later ported to Nut/OS. It is expected, that a port to Linux, and may be Mac OS X will follow. Beside porting the library to other embedded platforms, it is possible to develop and test web applications on a PC first, which is typically more convenient than uploading each modification to a target board for a test run.
The bad news is, that the new library API is incompatible to the old one. Applications needs to be rewritten to make use of it.
This document is divided into the following topics:
provides an overview of the application programming interface (API) of the MicroHTTP library.
Common Gateway Interface
explains how to implement CGI functions.
Server Side Includes
shows how to create dynamic web content with SSI.
looks into access authentication capabilities.
may, for example, allow users to upload new firmware versions.
to exchange data between the webserver and the webbrowser in the background.