summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPConnection.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-18 20:20:56 +0100
committermadmaxoft <github@xoft.cz>2014-01-18 20:20:56 +0100
commitfab726282c5d2e04cdc9daa88b5d0a05ead8cf33 (patch)
tree17d996a93bdc3bf1adb0eb58f48fbaa9514da3ad /src/HTTPServer/HTTPConnection.cpp
parentAlpha-sorted the finishers. (diff)
downloadcuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar.gz
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar.bz2
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar.lz
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar.xz
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.tar.zst
cuberite-fab726282c5d2e04cdc9daa88b5d0a05ead8cf33.zip
Diffstat (limited to 'src/HTTPServer/HTTPConnection.cpp')
-rw-r--r--src/HTTPServer/HTTPConnection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp
index 3d30ab177..a4af706f2 100644
--- a/src/HTTPServer/HTTPConnection.cpp
+++ b/src/HTTPServer/HTTPConnection.cpp
@@ -205,6 +205,12 @@ void cHTTPConnection::DataReceived(const char * a_Data, int a_Size)
{
m_State = wcsRecvIdle;
m_HTTPServer.RequestFinished(*this, *m_CurrentRequest);
+ if (!m_CurrentRequest->DoesAllowKeepAlive())
+ {
+ m_State = wcsInvalid;
+ m_HTTPServer.CloseConnection(*this);
+ return;
+ }
delete m_CurrentRequest;
m_CurrentRequest = NULL;
}