From 66ca8bc58837855a95042df3392cc360c7dad207 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Thu, 31 May 2007 14:58:07 +0000 Subject: - looking up paths now with MapUrl --- pages/content.ecpp | 6 +----- tntconfig.cpp | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pages/content.ecpp b/pages/content.ecpp index 7826113..d8ff0e7 100644 --- a/pages/content.ecpp +++ b/pages/content.ecpp @@ -9,9 +9,6 @@ using namespace std; using namespace vdrlive; -<%args> -string file; - <%session scope="global"> bool logged_in(false); @@ -19,9 +16,8 @@ bool logged_in(false); //if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); reply.setContentType("image/png"); -//reply.setContentType("text/plain"); -FileCache::ptr_type f = LiveFileCache().get("/tmp/live/" + file); +FileCache::ptr_type f = LiveFileCache().get("/tmp/live" + request.getPathInfo()); if (f.get() == 0) throw tnt::NotFoundException(request.getUrl()); diff --git a/tntconfig.cpp b/tntconfig.cpp index f047399..04add46 100644 --- a/tntconfig.cpp +++ b/tntconfig.cpp @@ -35,6 +35,7 @@ void TntConfig::WriteConfig() // XXX modularize file << "MapUrl ^/$ login@" << endl; + file << "MapUrl /([^/]+/.+) content@ $1" << endl; file << "MapUrl /([^.]+)(\\..+)? $1@" << endl; file << "PropertyFile " << m_propertiesPath << endl; file << "SessionTimeout 86400" << endl; -- cgit v1.2.3