aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_httpd_stats.cpp
diff options
context:
space:
mode:
authorGravatar special2007-08-19 11:03:27 +0000
committerGravatar special2007-08-19 11:03:27 +0000
commit05c95857273e6c68ca05ee786948c455ac7d3d39 (patch)
tree9dbfd12c93bc6aef66c13f552e83f3f7fe93783e /src/modules/m_httpd_stats.cpp
parentImproved compatibility with the JSON-RPC specification; beware, major overhau... (diff)
downloadinspircd++-05c95857273e6c68ca05ee786948c455ac7d3d39.tar.gz
inspircd++-05c95857273e6c68ca05ee786948c455ac7d3d39.tar.bz2
inspircd++-05c95857273e6c68ca05ee786948c455ac7d3d39.zip
Added proper header handling, persistant connections, and working timeouts to m_httpd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7743 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd_stats.cpp')
-rw-r--r--src/modules/m_httpd_stats.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 4139d7a20..6bf5dc868 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -20,6 +20,7 @@
#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 +172,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();
}