projects
/
profile
/
ivi
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec7e0dc
)
win32 use binary flag on opening http file
author
Andy Green
<andy@warmcat.com>
Sat, 14 May 2011 13:08:00 +0000
(15:08 +0200)
committer
Andy Green
<andy@warmcat.com>
Sat, 14 May 2011 13:08:00 +0000
(15:08 +0200)
Reported-by: Michel Archambault <marchamb@matrox.com>
Signed-off-by: Andy Green <andy@warmcat.com>
lib/parsers.c
patch
|
blob
|
history
diff --git
a/lib/parsers.c
b/lib/parsers.c
index
94b02fa
..
165f758
100644
(file)
--- a/
lib/parsers.c
+++ b/
lib/parsers.c
@@
-1670,7
+1670,11
@@
int libwebsockets_serve_http_file(struct libwebsocket *wsi, const char *file,
char *p = buf;
int n;
+#ifdef WIN32
+ fd = open(file, O_RDONLY | _O_BINARY);
+#else
fd = open(file, O_RDONLY);
+#endif
if (fd < 1) {
p += sprintf(p, "HTTP/1.0 400 Bad\x0d\x0a"
"Server: libwebsockets\x0d\x0a"