X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd.cpp;h=37f715a8da221914b3d54a44c0556193e5796b93;hb=f6aea98dc5c3d9e2e54cde5aaf3198eee3c1ebfb;hp=bf86c9091506e16d5ad4cff855c9e5ea56738a98;hpb=83c7cc45daf6fb1f8c36f15297a4657e45a34e88;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index bf86c9091..37f715a8d 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -186,7 +186,7 @@ class HttpServerSocket : public BufferedSocket date[strlen(date) - 1] = '\0'; rheaders.CreateHeader("Date", date); - rheaders.CreateHeader("Server", "InspIRCd/m_httpd.so/1.2"); + rheaders.CreateHeader("Server", BRANCH); rheaders.SetHeader("Content-Length", ConvToStr(size)); if (size) @@ -282,7 +282,7 @@ class HttpServerSocket : public BufferedSocket return; } - if (headers.IsSet("Content-Length") && (postsize = ConvToInt(headers.GetHeader("Content-Length"))) != 0) + if (headers.IsSet("Content-Length") && (postsize = ConvToInt(headers.GetHeader("Content-Length"))) > 0) { InternalState = HTTP_SERVE_RECV_POSTDATA; @@ -336,7 +336,8 @@ class ModuleHttpServer : public Module std::vector httpsocks; public: - ModuleHttpServer() { + void init() + { HttpModule = this; ServerInstance->Modules->Attach(I_OnAcceptConnection, this); }