X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd.cpp;h=dee0a9d48da7d61d890a349ebb25b9bbfdc253ee;hb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;hp=0584e97c5eea620a46b587ae7291541b78040fc9;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 0584e97c5..dee0a9d48 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -282,7 +282,7 @@ class HttpServerSocket : public BufferedSocket return; } - if (headers.IsSet("Content-Length") && (postsize = atoi(headers.GetHeader("Content-Length").c_str())) != 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); }