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.
Fork of HTTPServer by
Diff: Handler/FsHandler.cpp
- Revision:
- 7:cb7fec1265b5
- Parent:
- 5:dc88012caef1
- Child:
- 9:c2a1462b9b71
--- a/Handler/FsHandler.cpp Sat Jun 01 16:49:17 2013 +0000 +++ b/Handler/FsHandler.cpp Sat Jun 01 17:47:45 2013 +0000 @@ -16,7 +16,7 @@ #endif -#define MAX_BUFFERSIZE 128 +#define MAX_BUFFERSIZE 512 static char buffer[MAX_BUFFERSIZE]; @@ -73,6 +73,8 @@ startResponse(200, size); while(!feof(fp) && !ferror(fp)) { int cnt = fread(buffer, 1, MAX_BUFFERSIZE , fp); + if (cnt < 0) + cnt = 0; processResponse(cnt, buffer); } endResponse();