Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ab620e32
Commit
ab620e32
authored
Mar 08, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the lua http interface host and directory configurable.
parent
f4514d7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
share/luaintf/http.lua
share/luaintf/http.lua
+5
-2
No files found.
share/luaintf/http.lua
View file @
ab620e32
...
...
@@ -23,6 +23,8 @@
--[==========================================================================[
Configuration options:
* host: A host to listen on.
* dir: Directory to use a the http interface's root.
* no_error_detail: If set, do not print the Lua error message when generating
a page fails.
* no_index: If set, don't build directory indexes
...
...
@@ -188,7 +190,7 @@ local function find_datadir(name)
end
error
(
"Unable to find the `"
..
name
..
"' directory."
)
end
http_dir
=
find_datadir
(
"http-lua"
)
http_dir
=
config
.
dir
or
find_datadir
(
"http-lua"
)
do
local
oldpath
=
package.path
...
...
@@ -260,7 +262,8 @@ local function load_dir(dir,root,parent_acl)
end
end
h
=
httpd
.
new
(
"localhost"
,
8080
)
local
u
=
vlc
.
net
.
url_parse
(
config
.
host
or
"localhost:8080"
)
h
=
httpd
.
new
(
u
.
host
,
u
.
port
)
load_dir
(
http_dir
)
while
not
die
do
die
=
vlc
.
lock_and_wait
()
end
-- everything happens in callbacks
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment