Single instance HTTP Server using new Ethernet Interface. Blocking mode only; this improved stability, but the HTTP server must be started from a separate thread.

Dependents:   SmartLight

Fork of HTTPServer by Henry Leinen

Revision:
17:d7186c696729
Parent:
16:cc3f5c53d0d5
--- a/HTTPConnection.cpp	Sat Aug 17 16:17:55 2013 +0000
+++ b/HTTPConnection.cpp	Thu May 15 16:09:51 2014 +0000
@@ -62,7 +62,7 @@
     rcvd = parse(buffer);
     if (rcvd == -1) {
         //  Invalid content received, so close the connection
-        INFO("Invalid message received, so sending negative response and closing connection !");
+        INFO("Invalid message received, so sending negative response and closing connection!");
         sprintf(buffer,"HTTP/1.1 400 BadRequest\n\rContent-Length: %d\n\rContent-Type: text\n\r\n\r\n\r",0);
         m_Tcp.set_blocking(true, 1500);
         m_Tcp.send(buffer,strlen(buffer));
@@ -85,7 +85,7 @@
             if (parseHeader(buffer) == 0) {
             }
             else {
-                WARN("Invalid message header received !");
+                WARN("Invalid message header received!");
             }
         }
     }             
@@ -102,7 +102,7 @@
     m_Tcp.set_blocking(false);
     
     if (!m_Tcp.is_connected()) {
-        error("NOT COnnected anymore");
+        error("NOT connected anymore");
         return -1;
     }
     Timer tm;
@@ -233,7 +233,7 @@
             if (buffer[i] == '?') {  // starts with a question mark, so got it
                 buffer[i] = 0;
                 args_start = i; //  set the start of the args section
-                INFO("Argument section found !");
+                INFO("Argument section found!");
             }
         }
         else {                  // search arg-value touples