From c9f8a59a4dc297aea545bb9f83b3f13e5a25a7bb Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 3 Sep 2015 08:37:35 +0200 Subject: [PATCH] Fixes #15, file opened are now opened as binary. --- http_examples.cpp | 2 +- https_examples.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/http_examples.cpp b/http_examples.cpp index 1e0fa3d..1738a29 100644 --- a/http_examples.cpp +++ b/http_examples.cpp @@ -94,7 +94,7 @@ int main() { path+="/index.html"; if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) { ifstream ifs; - ifs.open(path.string(), ifstream::in); + ifs.open(path.string(), ifstream::in | ios::binary); if(ifs) { ifs.seekg(0, ios::end); diff --git a/https_examples.cpp b/https_examples.cpp index 6ce5dd0..29e84f6 100644 --- a/https_examples.cpp +++ b/https_examples.cpp @@ -94,7 +94,7 @@ int main() { path+="/index.html"; if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) { ifstream ifs; - ifs.open(path.string(), ifstream::in); + ifs.open(path.string(), ifstream::in | ios::binary); if(ifs) { ifs.seekg(0, ios::end);