Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HTTPServer by
Diff: Handler/FsHandler.cpp
- Revision:
- 7:cb7fec1265b5
- Parent:
- 5:dc88012caef1
- Child:
- 9:c2a1462b9b71
diff -r fe661fa9d18a -r cb7fec1265b5 Handler/FsHandler.cpp
--- 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();
