summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 3bfc8d16a..7d670ea2b 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -232,7 +232,7 @@ class HttpSocket : public InspSocket
void Page(std::stringstream* n, int response)
{
- SendHeaders(n->size(),response);
+ SendHeaders(n->str().length(),response);
this->Write(n->str());
}
};
@@ -284,6 +284,9 @@ class ModuleHttp : public Module
char* OnRequest(Request* request)
{
claimed = true;
+ HTTPDocument* doc = (HTTPDocument*)request->GetData();
+ HttpSocket* sock = (HttpSocket*)doc->sock;
+ sock->Page(doc->GetDocument(), doc->GetResponseCode());
return NULL;
}