diff options
-rw-r--r-- | src/IO.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -71,6 +71,10 @@ static int SendFilePage(cGH *cctkGH, httpRequest *request, void *data); static struct httpuFileList *filelist = NULL; static struct httpuMimeType *mimetypes = NULL; +#ifndef O_BINARY +#define O_BINARY 0 +#endif + /******************************************************************** ********************* External Routines ********************** ********************************************************************/ @@ -288,7 +292,7 @@ static int SendFilePage(cGH *cctkGH, httpRequest *request, void *data) { if(!strcmp(list->linkname, request->residual)) { - if((filedes = open(list->filename, O_RDONLY)) >= 0) + if((filedes = open(list->filename, O_RDONLY | O_BINARY)) >= 0) { strcpy(message,"HTTP/1.0 200 OK\r\n"); |