fixed with new libs

Dependents:   SmartRemote WifiFlexManager SmartRemote E7

Fork of HTTPServer by Ollie Milton

Revision:
7:cb7fec1265b5
Parent:
6:fe661fa9d18a
Child:
8:ccbdf6e28655
Child:
9:c2a1462b9b71
diff -r fe661fa9d18a -r cb7fec1265b5 HTTPRequestHandler.cpp
--- a/HTTPRequestHandler.cpp	Sat Jun 01 16:49:17 2013 +0000
+++ b/HTTPRequestHandler.cpp	Sat Jun 01 17:47:45 2013 +0000
@@ -86,13 +86,13 @@
 }
 
 
-void HTTPRequestHandler::startResponse(int returnCode, int nLen, HTTPHeaders* header)
+void HTTPRequestHandler::startResponse(int returnCode, long nLen, HTTPHeaders* header)
 {
-    INFO("Starting response !");
+    INFO("Starting response (%ld bytes in total)!", nLen);
     tcp.set_blocking(true, 1500);
     sprintf(buffer, "HTTP/1.1 %d OK\r\n", returnCode);
     tcp.send(buffer, strlen(buffer));
-    sprintf(buffer, "Content-Length: %d\r\n", nLen + 2);    //  Add 2 chars for the terminating CR+LF
+    sprintf(buffer, "Content-Length: %ld\r\n", nLen);    //  Add 2 chars for the terminating CR+LF
     tcp.send(buffer, strlen(buffer));
     if (header == NULL) {
         sprintf(buffer, "Content-Type: text/html\r\nServer: mbed embedded\r\n\r\n");
@@ -112,7 +112,7 @@
 
 void HTTPRequestHandler::processResponse(int nLen, char* body)
 {
-    INFO("Processing Response !");
+    INFO("Processing Response (%d bytes)!\n",nLen);
     tcp.send(body, nLen);
 }