From 05c95857273e6c68ca05ee786948c455ac7d3d39 Mon Sep 17 00:00:00 2001 From: special Date: Sun, 19 Aug 2007 11:03:27 +0000 Subject: 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 --- src/modules/m_httpd_stats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/m_httpd_stats.cpp') 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 StatsHash; typedef StatsHash::iterator StatsIter; @@ -171,7 +172,9 @@ class ModuleHttpStats : public Module data << ""; /* 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(); } -- cgit v1.3.1-10-gc9f91