summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_httpd.cpp5
-rw-r--r--src/modules/m_httpd_stats.cpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 7d670ea2b..dc6a7f418 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -213,7 +213,10 @@ class HttpSocket : public InspSocket
e.Send();
if (!claimed)
+ {
SendHeaders(0, 404);
+ log(DEBUG,"Page not claimed, 404");
+ }
}
}
@@ -232,6 +235,7 @@ class HttpSocket : public InspSocket
void Page(std::stringstream* n, int response)
{
+ log(DEBUG,"Sending page");
SendHeaders(n->str().length(),response);
this->Write(n->str());
}
@@ -283,6 +287,7 @@ class ModuleHttp : public Module
char* OnRequest(Request* request)
{
+ log(DEBUG,"Got HTTPDocument object");
claimed = true;
HTTPDocument* doc = (HTTPDocument*)request->GetData();
HttpSocket* sock = (HttpSocket*)doc->sock;
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index dd646d18f..3d02c68b5 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -48,12 +48,15 @@ class ModuleHttpStats : public Module
{
log(DEBUG,"HTTP URL!");
+ data.clear();
data << "<html><h1>Chickens</h1></html>";
HTTPRequest* http = (HTTPRequest*)event->GetData();
HTTPDocument response(http->sock, &data, 200);
Request req((char*)&response, (Module*)this, event->GetSource());
req.Send();
+
+ log(DEBUG,"Sent");
}
}