X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd.cpp;h=3bf99bfdf12d50ff46de46b58afe9856fe0af6c8;hb=93425ec211be8185fa9a428dcb24bc8b8121f917;hp=8b498f44706dde2fdc83b3ab41ab9f404fb01aa9;hpb=53afaa7cadcdf222dcf761441727305f79b4c557;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 8b498f447..3bf99bfdf 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -76,7 +76,7 @@ class HttpServerSocket : public BufferedSocket public: - HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0) + HttpServerSocket(InspIRCd* SI, std::string shost, int iport, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, shost, iport, listening, maxtime), index(index_page), postsize(0) { InternalState = HTTP_LISTEN; Timeout = NULL; @@ -270,7 +270,7 @@ class HttpServerSocket : public BufferedSocket virtual bool OnDataReady() { - char* data = this->Read(); + const char* data = this->Read(); /* Check that the data read is a valid pointer and it has some content */ if (!data || !*data) @@ -290,7 +290,7 @@ class HttpServerSocket : public BufferedSocket if (reqbuffer.length() >= 8192) { - Instance->Log(DEBUG, "m_httpd dropped connection due to an oversized request buffer"); + Instance->Logs->Log("m_httpd",DEBUG, "m_httpd dropped connection due to an oversized request buffer"); reqbuffer.clear(); return false; } @@ -407,9 +407,9 @@ class HttpServerSocket : public BufferedSocket } } - void Page(std::stringstream* n, int response, HTTPHeaders *headers) + void Page(std::stringstream* n, int response, HTTPHeaders *hheaders) { - SendHeaders(n->str().length(), response, *headers); + SendHeaders(n->str().length(), response, *hheaders); this->Write(n->str()); if (!keepalive) @@ -478,7 +478,7 @@ class ModuleHttpServer : public Module ServerInstance->Modules->Attach(eventlist, this, 1); } - char* OnRequest(Request* request) + virtual const char* OnRequest(Request* request) { claimed = true; HTTPDocument* doc = (HTTPDocument*)request->GetData();