summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel/static_fileserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/webcpanel/static_fileserver.cpp')
-rw-r--r--modules/extra/webcpanel/static_fileserver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/extra/webcpanel/static_fileserver.cpp b/modules/extra/webcpanel/static_fileserver.cpp
index 6e6d5ccd4..1fbf46ee8 100644
--- a/modules/extra/webcpanel/static_fileserver.cpp
+++ b/modules/extra/webcpanel/static_fileserver.cpp
@@ -17,7 +17,7 @@ StaticFileServer::StaticFileServer(const Anope::string &f_n, const Anope::string
{
}
-void StaticFileServer::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply)
+bool StaticFileServer::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply)
{
int fd = open((template_base + "/" + this->file_name).c_str(), O_RDONLY);
if (fd < 0)
@@ -25,7 +25,7 @@ void StaticFileServer::OnRequest(HTTPProvider *server, const Anope::string &page
Log(LOG_NORMAL, "httpd") << "Error serving file " << page_name << " (" << (template_base + "/" + this->file_name) << "): " << strerror(errno);
client->SendError(HTTP_PAGE_NOT_FOUND, "Page not found");
- return;
+ return true;
}
reply.content_type = this->GetContentType();
@@ -37,5 +37,6 @@ void StaticFileServer::OnRequest(HTTPProvider *server, const Anope::string &page
reply.Write(buffer, i);
close(fd);
+ return true;
}