Comparison

net/httpserver.lua @ 6780:647adfd8f738

net.*: Remove use of module() function
author Kim Alvefur <zash@zash.se>
date Sat, 21 Feb 2015 10:45:24 +0100
parent 4797:e239668aa6d2
child 7359:a5a080c12c96
comparison
equal deleted inserted replaced
6779:6236668da30a 6780:647adfd8f738
1 -- COMPAT w/pre-0.9 1 -- COMPAT w/pre-0.9
2 local log = require "util.logger".init("net.httpserver"); 2 local log = require "util.logger".init("net.httpserver");
3 local traceback = debug.traceback; 3 local traceback = debug.traceback;
4 4
5 module "httpserver" 5 local _ENV = nil;
6 6
7 function fail() 7 function fail()
8 log("error", "Attempt to use legacy HTTP API. For more info see http://prosody.im/doc/developers/legacy_http"); 8 log("error", "Attempt to use legacy HTTP API. For more info see http://prosody.im/doc/developers/legacy_http");
9 log("error", "Legacy HTTP API usage, %s", traceback("", 2)); 9 log("error", "Legacy HTTP API usage, %s", traceback("", 2));
10 end 10 end
11 11
12 new, new_from_config = fail, fail; 12 return {
13 set_default_handler = fail; 13 new = fail;
14 14 new_from_config = fail;
15 return _M; 15 set_default_handler = fail;
16 };