Changeset ab620e32135cc274bff54297ba2301a3d2ed2c78
- 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
| re10d431 |
rab620e3 |
|
| 24 | 24 | --[==========================================================================[ |
|---|
| 25 | 25 | Configuration options: |
|---|
| | 26 | * host: A host to listen on. |
|---|
| | 27 | * dir: Directory to use a the http interface's root. |
|---|
| 26 | 28 | * no_error_detail: If set, do not print the Lua error message when generating |
|---|
| 27 | 29 | a page fails. |
|---|
| … | … | |
| 189 | 191 | error("Unable to find the `"..name.."' directory.") |
|---|
| 190 | 192 | end |
|---|
| 191 | | http_dir = find_datadir("http-lua") |
|---|
| | 193 | http_dir = config.dir or find_datadir("http-lua") |
|---|
| 192 | 194 | |
|---|
| 193 | 195 | do |
|---|
| … | … | |
| 261 | 263 | end |
|---|
| 262 | 264 | |
|---|
| 263 | | h = httpd.new("localhost",8080) |
|---|
| | 265 | local u = vlc.net.url_parse( config.host or "localhost:8080" ) |
|---|
| | 266 | h = httpd.new(u.host,u.port) |
|---|
| 264 | 267 | load_dir( http_dir ) |
|---|
| 265 | 268 | |
|---|