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.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index b44585ba6..3b8bc20b8 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -16,11 +16,8 @@
using namespace std;
-#include <stdio.h>
-#include "users.h"
-#include "channels.h"
+#include <algorithm>
#include "modules.h"
-#include "inspsocket.h"
#include "inspircd.h"
#include "httpd.h"
@@ -43,13 +40,23 @@ enum HttpState
class HttpSocket;
+/** This class is used to handle HTTP socket timeouts
+ */
class HTTPTimeout : public InspTimer
{
private:
+ /** HttpSocket we are attached to
+ */
HttpSocket* s;
+ /** Socketengine the file descriptor is in
+ */
SocketEngine* SE;
public:
+ /** Attach timeout to HttpSocket
+ */
HTTPTimeout(HttpSocket* sock, SocketEngine* engine);
+ /** Handle timer tick
+ */
void Tick(time_t TIME);
};
@@ -233,6 +240,9 @@ class HttpSocket : public InspSocket
headers >> request_type;
headers >> uri;
headers >> http_version;
+
+ std::transform(request_type.begin(), request_type.end(), request_type.begin(), ::toupper);
+ std::transform(http_version.begin(), http_version.end(), http_version.begin(), ::toupper);
}
if ((InternalState == HTTP_SERVE_WAIT_REQUEST) && (request_type == "POST"))