A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.

Dependents:   Smart-WiFly-WebServer WattEye X10Svr SSDP_Server

Revision:
46:eaa86d48be6f
Parent:
44:71f09e4255f4
Child:
48:078adbe279ac
--- a/SW_HTTPServer.h	Mon Apr 11 02:20:08 2016 +0000
+++ b/SW_HTTPServer.h	Sun Feb 05 00:40:10 2017 +0000
@@ -50,7 +50,7 @@
 /// @endcode
 ///
 /// This web server used nweb as a starting point, but expanded well beyond that.
-///  http://www.ibm.com/developerworks/systems/library/es-nweb/sidefile1.html
+/// http://nmon.sourceforge.net/pmwiki.php?n=Site.Nweb&cm_mc_uid=21286415979014862330090&cm_mc_sid_50200000=1486233009
 ///
 /// Given: scheme://server:port/path?query_string#fragment_id
 /// @li scheme is "http"
@@ -117,7 +117,7 @@
 /// @li 20130911 Lots of incremental changes along this way, this update
 ///              refreshes the documentation.
 ///
-/// @note Copyright © 2014-2016 by Smartware Computing, all rights reserved.
+/// @note Copyright © 2014-2017 by Smartware Computing, all rights reserved.
 ///     Individuals may use this application for evaluation or non-commercial
 ///     purposes. Within this restriction, changes may be made to this application
 ///     as long as this copyright notice is retained. The user shall make
@@ -469,14 +469,14 @@
     *   svr.RegisterHandler("/dyn1", SimpleDynamicPage);
     *   ...
     *
-    *   bool SimpleDynamicPage(HTTPServer *svr, HTTPServer::CallBackType type, const char * path, 
+    *   HTTPServer::CallBackResults SimpleDynamicPage(HTTPServer *svr, HTTPServer::CallBackType type, const char * path, 
     *       const HTTPServer::namevalue *queryParams, int queryParamCount) {
     *       char buf[100];
-    *       bool ret = false;
+    *       HTTPServer::CallBackResults ret = HTTPServer::ACCEPT_ERROR;
     *
     *       switch (type) {
     *           case HTTPServer::SEND_PAGE:
-    *               svr->header(200, "OK", "Content-Type: text/html\r\n");
+    *               svr->header(HTTPServer::OK, "OK", "Content-Type: text/html\r\n");
     *               svr->send("<html><head><title>Dynamic Page</title></head>\r\n");
     *               svr->send("<body>\r\n");
     *               svr->send("This page was generated dynamically. Create your own name=value pairs on the URL "
@@ -493,19 +493,19 @@
     *               sprintf(buf,"Max Header size: %d<br/>\r\n", svr->GetMaxHeaderSize());
     *               svr->send(buf);
     *               svr->send("<br/><a href='/'>back to main</a></body></html>\r\n");
-    *               ret = true;
+    *               ret = HTTPServer::ACCEPT_COMPLETE;
     *               break;
     *           case HTTPServer::CONTENT_LENGTH_REQUEST:
-    *               ret = true;
+    *               ret = HTTPServer::ACCEPT_COMPLETE;
     *               break;
     *           case HTTPServer::DATA_TRANSFER:
-    *               ret = true;
+    *               ret = HTTPServer::ACCEPT_COMPLETE;
     *               break;
     *           default:
-    *               ret = false;
+    *               ret = HTTPServer::ACCEPT_ERROR;
     *               break;
     *       }
-    *       return ret;
+    *   return ret;
     *   }
     * @endcode
     *