Merge with 0.5
[prosody.git] / plugins / mod_httpserver.lua
index 02a9fd78d57c3adbe643f3634ed9ae8bb0593435..a863928148bf33407b80c0c7cd8f31638813a84e 100644 (file)
@@ -1,3 +1,13 @@
+-- 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";
 
 local open = io.open;
 local t_concat = table.concat;
@@ -17,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);