Changeset ab620e32135cc274bff54297ba2301a3d2ed2c78

Show
Ignore:
Timestamp:
03/08/08 16:16:07 (4 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1204989367 +0100
git-parent:

[f4514d7d0f2fd2c85dd0e0933478cc60a85346e6]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1204987123 +0100
Message:

Make the lua http interface host and directory configurable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • share/luaintf/http.lua

    re10d431 rab620e3  
    2424--[==========================================================================[ 
    2525Configuration options: 
     26 * host: A host to listen on. 
     27 * dir: Directory to use a the http interface's root. 
    2628 * no_error_detail: If set, do not print the Lua error message when generating 
    2729                    a page fails. 
     
    189191    error("Unable to find the `"..name.."' directory.") 
    190192end 
    191 http_dir = find_datadir("http-lua") 
     193http_dir = config.dir or find_datadir("http-lua") 
    192194 
    193195do 
     
    261263end 
    262264 
    263 h = httpd.new("localhost",8080) 
     265local u = vlc.net.url_parse( config.host or "localhost:8080" ) 
     266h = httpd.new(u.host,u.port) 
    264267load_dir( http_dir ) 
    265268