[luci] [LuCI] #102: Bug in tcpserver.lua
LuciTrac
trac at luci.subsignal.org
Thu Dec 31 18:02:15 CET 2009
#102: Bug in tcpserver.lua
------------------------------+---------------------------------------------
Reporter: reporter | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: LuCI Initscripts | Keywords:
------------------------------+---------------------------------------------
When binding luci (lua) to a specific interface, the following line in
/usr/lib/lua/luci/lucid/tcpserver.lua on KAMIKAZE (bleeding edge, r18946)
doesn't do what I think it's supposed to do:
local host, port = addr:match("(.-):?([^:]*)")
As far as I can tell, one should be able to have a config section such as:
config daemon http
option slave httpd
list address 192.168.1.1:80
list publisher webroot
list publisher luciweb
option nokeepalive 1
option memlimit 1572864
option enabled 1
The addr:match... call should parse 192.168.1.1 into host and 80 into
port, but it's simply not working. I'm a beginner at lua but I have much
experience with pcre, and I still can't see what's wrong. Using
local host, port = addr:match("(.-):?(.*)")
works for host:port addresses, but not when only supplying a port number
as address.
I'll continue digging, but anyone more experienced in lua might see what's
wrong right away.
--
Ticket URL: <http://luci.subsignal.org/trac/ticket/102>
LuCI <http://luci.subsignal.org/trac>
LuCI - Lua Configuration Interface
More information about the luci
mailing list