Merge with 0.5
[prosody.git] / plugins / mod_httpserver.lua
index 2bcdab43a5564eca710e613b3f028b06dd2da3f9..a863928148bf33407b80c0c7cd8f31638813a84e 100644 (file)
@@ -1,3 +1,11 @@
+-- Prosody IM
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
+-- 
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
 
 local httpserver = require "net.httpserver";
 
@@ -19,4 +27,5 @@ local function handle_request(method, body, request)
        return data;
 end
 
-httpserver.new{ port = 5280, base = "files", handler = handle_request, ssl = false}
\ No newline at end of file
+local ports = config.get(module.host, "core", "http_ports") or { 5280 };
+httpserver.new_from_config(ports, "files", handle_request);