Loading src/blogi.cpp +26 −6 Original line number Diff line number Diff line Loading @@ -268,12 +268,7 @@ static bool handleDeployFallback(libhttppp::HttpRequest &curreq, const int tid, } } libhttppp::HttpResponse resp; resp.setState(HTTP503); resp.setContentType("text/plain"); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); return true; return false; } blogi::Blogi::Blogi(std::vector<netplus::socket*> serversocket,bool debug) : HttpEvent(serversocket), _debug(debug){ Loading Loading @@ -2542,6 +2537,19 @@ void blogi::Blogi::RequestEvent(libhttppp::HttpRequest &curreq,const int tid,ULO blogi::Config *deployCfg = ctx ? ctx->config.get() : Blogi::Cfg.get(); if (deployCfg && handleDeployFallback(curreq, tid, *deployCfg, _debug)) return; // deploy URL but no plugin found libhttppp::HttpResponse resp; resp.setContentType("text/plain"); if (ctx) { resp.setState(HTTP503); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); } else { resp.setState(HTTP404); const char *body = "Not Found"; resp.send(curreq, body, strlen(body)); } return; } // Resolve which domain context to use for this request Loading Loading @@ -2995,6 +3003,18 @@ void blogi::Blogi::ResponseEvent(libhttppp::HttpRequest& curreq,const int tid,UL blogi::Config *deployCfg = ctx ? ctx->config.get() : Blogi::Cfg.get(); if (deployCfg && handleDeployFallback(curreq, tid, *deployCfg, _debug)) return; libhttppp::HttpResponse resp; resp.setContentType("text/plain"); if (ctx) { resp.setState(HTTP503); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); } else { resp.setState(HTTP404); const char *body = "Not Found"; resp.send(curreq, body, strlen(body)); } return; } if (!ctx) return; Loading Loading
src/blogi.cpp +26 −6 Original line number Diff line number Diff line Loading @@ -268,12 +268,7 @@ static bool handleDeployFallback(libhttppp::HttpRequest &curreq, const int tid, } } libhttppp::HttpResponse resp; resp.setState(HTTP503); resp.setContentType("text/plain"); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); return true; return false; } blogi::Blogi::Blogi(std::vector<netplus::socket*> serversocket,bool debug) : HttpEvent(serversocket), _debug(debug){ Loading Loading @@ -2542,6 +2537,19 @@ void blogi::Blogi::RequestEvent(libhttppp::HttpRequest &curreq,const int tid,ULO blogi::Config *deployCfg = ctx ? ctx->config.get() : Blogi::Cfg.get(); if (deployCfg && handleDeployFallback(curreq, tid, *deployCfg, _debug)) return; // deploy URL but no plugin found libhttppp::HttpResponse resp; resp.setContentType("text/plain"); if (ctx) { resp.setState(HTTP503); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); } else { resp.setState(HTTP404); const char *body = "Not Found"; resp.send(curreq, body, strlen(body)); } return; } // Resolve which domain context to use for this request Loading Loading @@ -2995,6 +3003,18 @@ void blogi::Blogi::ResponseEvent(libhttppp::HttpRequest& curreq,const int tid,UL blogi::Config *deployCfg = ctx ? ctx->config.get() : Blogi::Cfg.get(); if (deployCfg && handleDeployFallback(curreq, tid, *deployCfg, _debug)) return; libhttppp::HttpResponse resp; resp.setContentType("text/plain"); if (ctx) { resp.setState(HTTP503); const char *body = "Deploy plugin not available."; resp.send(curreq, body, strlen(body)); } else { resp.setState(HTTP404); const char *body = "Not Found"; resp.send(curreq, body, strlen(body)); } return; } if (!ctx) return; Loading