summaryrefslogtreecommitdiffhomepage
path: root/response.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-11 19:46:30 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-11 19:46:30 +0200
commit15b2be158ac0147982dd30382251b3ce83e219c7 (patch)
treefbad8b504b91f141b0bfcd85f6ddaaef497b297b /response.cpp
parentb671c8c07ae7690e069c8e3c1ef54a31c591775d (diff)
Generate download link for files
Diffstat (limited to 'response.cpp')
-rw-r--r--response.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/response.cpp b/response.cpp
index a6f55e2..706090e 100644
--- a/response.cpp
+++ b/response.cpp
@@ -37,6 +37,8 @@ public:
{
}
+ // GetTarget() == GetPluginPath() + GetRelativePath()
+
const Path& GetPath() const {return m_path;}
std::string GetPluginName() const {return m_path.params.at("plugin");} // can throw std::out_of_range
@@ -146,7 +148,7 @@ std::unordered_map<std::string, std::function<std::string(RequestContext&)>> Get
{"rel_target", [](RequestContext& req_ctx) {return req_ctx.GetRelativePath();}},
- {"target", [](RequestContext& req_ctx) {return req_ctx.GetTarget();}},
+ {"target", [](RequestContext& req_ctx) {return req_ctx.GetTarget();}}, // target == plugin_path / rel_target
};
std::string GetRequestParam(const std::string& key, RequestContext& req_ctx)