1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 03:16:37 +02:00

Move HTTP types to the HTTP namespace.

This commit is contained in:
Sadie Powell
2025-05-09 12:36:42 +01:00
parent 8b089ab1a7
commit b76b407b33
42 changed files with 200 additions and 175 deletions
+3 -3
View File
@@ -86,14 +86,14 @@ TemplateFileServer::TemplateFileServer(const Anope::string &f_n) : file_name(f_n
{
}
void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, Replacements &r)
void TemplateFileServer::Serve(HTTP::Provider *server, const Anope::string &page_name, HTTP::Client *client, HTTP::Message &message, HTTP::Reply &reply, Replacements &r)
{
int fd = open((template_base + "/" + this->file_name).c_str(), O_RDONLY);
if (fd < 0)
{
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");
client->SendError(HTTP::PAGE_NOT_FOUND, "Page not found");
return;
}
@@ -237,7 +237,7 @@ void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_n
Anope::string replacement = FindReplacement(r, content.substr(0, f - 1));
// htmlescape all text replaced onto the page
replacement = HTTPUtils::Escape(replacement);
replacement = HTTP::Escape(replacement);
finished += replacement;
}