diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-08-09 13:24:33 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-08-09 13:24:33 +0200 |
commit | 0475d783825a6f649853da581df5d812cf5f3bae (patch) | |
tree | 9c7c183c25d402253a2850b5534a2254e2d28dd5 /main.cc | |
parent | d80dcfd06b5be6b950cde09194161ff0f10dde27 (diff) |
Removed sequential content forward when acting as http proxy.
Change-Id: I19a146a9b306b3504cd40d15b909b3a923af8840
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -153,14 +153,14 @@ int main(int argc, char **argv) { boost::filesystem::path path = web_root_path; path /= request->getPath(); + if (path.extension().string() == ".mpd") { + response->setResponseLifetime(std::chrono::milliseconds(1000)); + } + if (boost::filesystem::exists(path)) { path = boost::filesystem::canonical(path); - if (path.extension().string() == ".mpd") { - response->setResponseLifetime(std::chrono::milliseconds(1000)); - } - //Check if path is within web_root_path if (distance(web_root_path.begin(), web_root_path.end()) <= distance(path.begin(), path.end()) && equal(web_root_path.begin(), web_root_path.end(), path.begin())) { |