aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-28 16:41:35 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-28 16:41:35 +0100
commit30957d900de03520b693e9ee5d0310916e5600b4 (patch)
tree026756495dbd59e67a4e7d634caad12020a956be
parent449813a79ee6aeb2f0a3c239b3e9c09df0634f0d (diff)
downloadprosody-30957d900de03520b693e9ee5d0310916e5600b4.tar.gz
prosody-30957d900de03520b693e9ee5d0310916e5600b4.zip
net.httpserver: Add compatibility stub
-rw-r--r--net/httpserver.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua
new file mode 100644
index 00000000..7d574788
--- /dev/null
+++ b/net/httpserver.lua
@@ -0,0 +1,15 @@
+-- COMPAT w/pre-0.9
+local log = require "util.logger".init("net.httpserver");
+local traceback = debug.traceback;
+
+module "httpserver"
+
+function fail()
+ log("error", "Attempt to use legacy HTTP API. For more info see http://prosody.im/doc/developers/legacy_http");
+ log("error", "Legacy HTTP API usage, %s", traceback("", 2));
+end
+
+new, new_from_config = fail, fail;
+set_default_handler = fail;
+
+return _M;