summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/NetworkTest/NetworkTest.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-02-14 13:55:54 +0100
committerMattes D <github@xoft.cz>2015-02-14 13:55:54 +0100
commitd336a3ea9e581372e225ee64113fe7fd7e080d45 (patch)
treef0d4c8d3a4ce08d2861f3a1f6cd93bd557594966 /MCServer/Plugins/NetworkTest/NetworkTest.lua
parentSslContext: Turned debug messages off. (diff)
downloadcuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar.gz
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar.bz2
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar.lz
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar.xz
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.tar.zst
cuberite-d336a3ea9e581372e225ee64113fe7fd7e080d45.zip
Diffstat (limited to 'MCServer/Plugins/NetworkTest/NetworkTest.lua')
-rw-r--r--MCServer/Plugins/NetworkTest/NetworkTest.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/MCServer/Plugins/NetworkTest/NetworkTest.lua b/MCServer/Plugins/NetworkTest/NetworkTest.lua
index 251e29884..39774f403 100644
--- a/MCServer/Plugins/NetworkTest/NetworkTest.lua
+++ b/MCServer/Plugins/NetworkTest/NetworkTest.lua
@@ -163,14 +163,15 @@ local g_Services =
OnReceivedData = function (a_Link, a_Data)
IncomingData = IncomingData .. a_Data
if (IncomingData:find("\r\n\r\n")) then
+ -- We have received the entire request headers, just send the response and shutdown the link:
local Content = os.date()
a_Link:Send("HTTP/1.0 200 OK\r\nContent-type: text/plain\r\nContent-length: " .. #Content .. "\r\n\r\n" .. Content)
- -- TODO: shutdown is not yet properly implemented in cTCPLink
- -- a_Link:Shutdown()
+ a_Link:Shutdown()
end
end,
OnRemoteClosed = function (a_Link)
+ LOG("httpstime: link closed by remote")
end
} -- Link callbacks
end, -- OnIncomingConnection()