A simple web server that can be bound to either the EthernetInterface or the WiflyInterface.
Dependents: Smart-WiFly-WebServer WattEye X10Svr SSDP_Server
Diff: SW_HTTPServer.cpp
- Revision:
- 42:0d5b682bb17a
- Parent:
- 41:6f2f1fb96742
- Child:
- 43:3fc773c2986e
diff -r 6f2f1fb96742 -r 0d5b682bb17a SW_HTTPServer.cpp --- a/SW_HTTPServer.cpp Wed Sep 03 09:32:17 2014 +0000 +++ b/SW_HTTPServer.cpp Wed Sep 03 10:42:33 2014 +0000 @@ -132,7 +132,7 @@ server->set_blocking(false, 10); client.set_blocking(false, 100); //@TODO client is separate from server. any way to combine? #else - #warning CC3000 detected, using modified blocking settings + #warning CC3000 detected #endif ResetPerformanceData(); PerformanceTimer.start(); @@ -295,7 +295,7 @@ { if (bytes == -1) bytes = strlen(msg); - INFO("Sending %d bytes", bytes); + //INFO("Sending %d bytes", bytes); client.send((char *)msg, bytes); } @@ -428,7 +428,7 @@ if (pVal) *pVal = '\0'; do { - INFO("ParseParameters(%s), qP:{%s}, qpCount: %d", pName, qP->name, *qpCount); + INFO("ParseParameters(%s), qpCount: %d", pName, *qpCount); qP->name = pName; pVal = strchr(pName, '='); pNextName = strchr(pName,'&'); @@ -744,8 +744,8 @@ ttlCount = strlen(dblCR); strcpy(postQueryString, dblCR); INFO(" {%s}", postQueryString); - while (ttlCount <= postBytes && !escape) { - INFO("ttlCount: %d <= postBytes: %d, of chunk %d", ttlCount, postBytes, CHUNK_SIZE); + while (ttlCount < postBytes && !escape) { + INFO("ttlCount: %d < postBytes: %d, of chunk %d", ttlCount, postBytes, CHUNK_SIZE); len = client.receive_all(postQueryString + ttlCount, CHUNK_SIZE - ttlCount); if (len > 0) { INFO(" len: %d, ttlCount: %d < postBytes %d, {%s}", len, ttlCount, postBytes, postQueryString + ttlCount);