From 7a1a23bf9c02b731980e4b9c85874a7e7c705a08 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 30 May 2017 19:05:20 +0200 Subject: [PATCH] Fixes #126: unreachable code in http(s) examples --- http_examples.cpp | 2 -- https_examples.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/http_examples.cpp b/http_examples.cpp index 26ff6eb..e88d992 100644 --- a/http_examples.cpp +++ b/http_examples.cpp @@ -118,8 +118,6 @@ int main() { throw invalid_argument("path must be within root path"); if(boost::filesystem::is_directory(path)) path/="index.html"; - if(!(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path))) - throw invalid_argument("file does not exist"); std::string cache_control, etag; diff --git a/https_examples.cpp b/https_examples.cpp index 8862170..91bcfa5 100644 --- a/https_examples.cpp +++ b/https_examples.cpp @@ -116,8 +116,6 @@ int main() { throw invalid_argument("path must be within root path"); if(boost::filesystem::is_directory(path)) path/="index.html"; - if(!(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path))) - throw invalid_argument("file does not exist"); std::string cache_control, etag;