summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-11 00:15:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-11 00:15:28 +0000
commitbd6158e7b044f853be0b493c0ccbfc7a5c05082e (patch)
tree07e1ab488b2ff8b91cf4b5942e54d8ec4e38f240 /src/modules/m_httpd.cpp
parenta363c6f2bebc02ab553ee96b0e9e865e4f93e2d8 (diff)
Remove WaitingForWriteEvent, it seems to do *nothing* except confuse things. Also, don't close socket on http if FlushWriteBuf doesn't write it all in one go, in fact, don't try FlushWriteBuf at all - use the sockets default of waiting to be told it's safe to write data.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10509 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 777ba5567..eaf671267 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -165,7 +165,6 @@ class HttpServerSocket : public BufferedSocket
SendHeaders(data.length(), response, empty);
this->Write(data);
- this->FlushWriteBuffer();
}
void SendHeaders(unsigned long size, int response, HTTPHeaders &rheaders)
@@ -251,7 +250,6 @@ class HttpServerSocket : public BufferedSocket
if (request_type.empty() || uri.empty() || http_version.empty())
{
SendHTTPError(400);
- SetWrite();
return;
}
@@ -265,7 +263,6 @@ class HttpServerSocket : public BufferedSocket
if ((fieldsep == std::string::npos) || (fieldsep == 0) || (fieldsep == cheader.length() - 1))
{
SendHTTPError(400);
- SetWrite();
return;
}
@@ -282,7 +279,6 @@ class HttpServerSocket : public BufferedSocket
if ((http_version != "HTTP/1.1") && (http_version != "HTTP/1.0"))
{
SendHTTPError(505);
- SetWrite();
return;
}
@@ -319,8 +315,6 @@ class HttpServerSocket : public BufferedSocket
HTTPHeaders empty;
SendHeaders(index->ContentSize(), 200, empty);
this->Write(index->Contents());
- this->FlushWriteBuffer();
- SetWrite();
}
else
{
@@ -335,32 +329,15 @@ class HttpServerSocket : public BufferedSocket
if (!claimed)
{
SendHTTPError(404);
- SetWrite();
}
}
}
}
-
- bool OnWriteReady()
- {
- Instance->Logs->Log("m_httpd",DEBUG,"OnWriteReady()");
- return false;
- }
-
void Page(std::stringstream* n, int response, HTTPHeaders *hheaders)
{
SendHeaders(n->str().length(), response, *hheaders);
this->Write(n->str());
- this->FlushWriteBuffer();
- SetWrite();
- }
-
- void SetWrite()
- {
- Instance->Logs->Log("m_httpd",DEBUG,"SetWrite()");
- this->WaitingForWriteEvent = true;
- Instance->SE->WantWrite(this);
}
};