[vlc-commits] luahttp: print error when setting the host from the lua configuration

Pierre Ynard git at videolan.org
Sun Dec 18 19:38:01 CET 2011


vlc/vlc-1.2 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Dec 18 19:08:08 2011 +0100| [e338f0de8f3186b7e5d16ec5cfd09f4c158dd5bb] | committer: Pierre Ynard

luahttp: print error when setting the host from the lua configuration
(cherry picked from commit 97e6ed6001719200862b537710cc40f739a376fc)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=e338f0de8f3186b7e5d16ec5cfd09f4c158dd5bb
---

 share/lua/intf/http.lua |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua
index 0fa0f17..8c1dddb 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -311,6 +311,12 @@ local function load_dir(dir,root,parent_acl)
     return my_acl
 end
 
+if config.host then
+    vlc.msg.err("\""..config.host.."\" HTTP host ignored")
+    local port = string.match(config.host, ":(%d+)[^]]*$")
+    vlc.msg.info("Pass --http-host=IP "..(port and "and --http-port="..port.." " or "").."on the command line instead.")
+end
+
 h = vlc.httpd()
 local root_acl = load_dir( http_dir )
 local a = h:handler("/art",nil,nil,root_acl,callback_art,nil)



More information about the vlc-commits mailing list