From be743c115df688e4e5b9389060e28500331d5194 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 1 Mar 2017 13:41:04 +0100 Subject: [PATCH] nb: When we cannot send the file, we must respond with 404. Change-Id: I5f11e7de4b0bfb6e44929b8317e4788d2cc81610 --- net/Socket.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/net/Socket.hpp b/net/Socket.hpp index 5ba902e25..fe4a72163 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -586,6 +586,7 @@ namespace HttpHelper if (stat(path.c_str(), &st) != 0) { LOG_WRN("Failed to stat [" << path << "]. File will not be sent."); + throw Poco::FileNotFoundException("Failed to stat [" + path + "]. File will not be sent."); return; }