summaryrefslogtreecommitdiffhomepage
path: root/response.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'response.cpp')
-rw-r--r--response.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/response.cpp b/response.cpp
index eeda8d0..ed30550 100644
--- a/response.cpp
+++ b/response.cpp
@@ -40,7 +40,7 @@ public:
{
}
- // GetTarget() == GetPluginPath() + GetRelativePath()
+ // GetTarget() == GetPluginPath() + "/" + GetRelativePath()
const Path& GetPath() const {return m_path;} // GetPluginPath w/ configured params as struct
@@ -337,19 +337,14 @@ response_type response::generate_response(request_type& req, Server& server)
std::string response::get_websocket_address(request_type& req, Server& server)
{
try {
- std::cout << "DEBUG0" << std::endl;
- std::cout << "DEBUG0: " << req.target() << std::endl;
RequestContext req_ctx{req, server}; // can throw std::out_of_range
- std::cout << "DEBUG1" << std::endl;
if (req_ctx.GetPluginName() != "websocket") {
std::cout << "Bad plugin configured for websocket request: " << req_ctx.GetPluginName() << std::endl;
return {};
}
- std::cout << "DEBUG2" << std::endl;
- return req_ctx.GetDocRoot(); // Configured "path" in config: host:port for websocket
- std::cout << "DEBUG3" << std::endl;
+ return req_ctx.GetDocRoot() + "/" + req_ctx.GetRelativePath(); // Configured "path" in config: host:port/relative_path for websocket
} catch (const std::exception& ex) {
std::cout << "No matching configured target websocket found: " << ex.what() << std::endl;