aboutsummaryrefslogtreecommitdiff
path: root/src/IO.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/IO.c')
-rw-r--r--src/IO.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/IO.c b/src/IO.c
index 55ffbf4..36dbe57 100644
--- a/src/IO.c
+++ b/src/IO.c
@@ -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");