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.
Dependents: EthHTTPServer if201410_section5 _PE2E_12-04_EthernetInterfaceServer MGAS_GR_Peach ... more
Fork of WiFlyHTTPServer 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();
