]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
Remove unneeded headers from spanningtree. This was done to the rest of the source...
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index 4139d7a2051d62abc17e45a5c01c2b7054431a05..9e89bd1497e25688eb16fcf97658219b67416f57 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "configreader.h"
-#include "modules.h"
-#include "inspsocket.h"
 #include "httpd.h"
 
 /* $ModDesc: Provides statistics over HTTP via m_httpd.so */
+/* $ModDep: httpd.h */
 
 typedef std::map<irc::string,int> StatsHash;
 typedef StatsHash::iterator StatsIter;
@@ -171,7 +167,9 @@ class ModuleHttpStats : public Module
                                data << "</inspircdstats>";
 
                                /* Send the document back to m_httpd */
-                               HTTPDocument response(http->sock, &data, 200, "X-Powered-By: m_http_stats.so\r\nContent-Type: text/xml\r\n");
+                               HTTPDocument response(http->sock, &data, 200);
+                               response.headers.SetHeader("X-Powered-By", "m_httpd_stats.so");
+                               response.headers.SetHeader("Content-Type", "text/xml");
                                Request req((char*)&response, (Module*)this, event->GetSource());
                                req.Send();
                        }