aboutsummaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-08-08 20:12:39 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-08-08 20:12:39 +0200
commitcbc04c22d00db043716fc695d40937252ebbf9ee (patch)
tree7001052eb3d0ed4416db2c590cf3f3fa7e5ec0b2 /main.cc
parent582ac1576f63554bf5af0f28c8b12ab5f25854ef (diff)
- Send proxied response sequentially
- Set mpd lifetime to 1 second - Change default lifetime for a generic content Change-Id: I43fd9e61d5cba059e32f67665d0ac22ce04682de Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cc b/main.cc
index c222db20..56e8fedc 100644
--- a/main.cc
+++ b/main.cc
@@ -157,6 +157,10 @@ int main(int argc, char **argv) {
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())) {