summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-11 13:15:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-11 13:15:55 +0000
commit994c70862fd98531d72f3604b54f56e1a90ac82c (patch)
tree8f1d5f150ca0ee65ce8f7d2ef314f6a8f3486325 /src/modules/m_httpd.cpp
parent3f80008ba387b1e1e9e360f047fd6d1684c85d4c (diff)
Craqbusters
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4326 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index b618e01f9..d0c63d818 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -29,7 +29,7 @@ using namespace std;
class ModuleHttp;
static Server *Srv;
-static ModuleHttp* HttpModule;
+ModuleHttp* HttpModule;
extern time_t TIME;
enum HttpState
@@ -85,6 +85,7 @@ class HttpSocket : public InspSocket
{
char* data = this->Read();
std::string request_type;
+ std::string uri;
/* Check that the data read is a valid pointer and it has some content */
if (data && *data)
@@ -99,15 +100,15 @@ class HttpSocket : public InspSocket
headers >> request_type;
headers >> uri;
- if ((request_type == "GET") && (uri = "/"))
+ if ((request_type == "GET") && (uri == "/"))
{
SendHeaders(index->ContentSize());
this->Write(index->Contents());
}
else
{
- HttpRequest httpr(request_type,uri,headers,this,this->GetIP());
- Event e(uri, HttpModule, "httpd_url");
+ HTTPRequest httpr(request_type,uri,&headers,this,this->GetIP());
+ Event e((char*)&httpr, (Module*)HttpModule, "httpd_url");
}
return false;
@@ -203,8 +204,8 @@ class ModuleHttpFactory : public ModuleFactory
virtual Module * CreateModule(Server* Me)
{
- ModuleHttp = new ModuleHttp(Me);
- return new HttpModule;
+ HttpModule = new ModuleHttp(Me);
+ return HttpModule;
}
};