Skip to content
Snippets Groups Projects
Commit 9a52f71b authored by Alejandro González's avatar Alejandro González Committed by Jean-Baptiste Kempf
Browse files

Fix share/lua/README.txt HTTPd documentation


According to my
code review and testing, the vlc.httpd() Lua method does not take any
arguments and neither support HTTPS in the current VLC version. Also, the
documentation doesn't make it clear on what type of Lua modules it's
available, when it can only be used in the context of interfaces.

Some code snippets that seem to support the findings mentioned above:
modules/lua/intf.c#L258
modules/lua/libs/httpd.c#L82

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c4113a97
No related branches found
No related tags found
No related merge requests found
......@@ -99,11 +99,11 @@ Extension
---------
deactivate(): Deactivate current extension (after the end of the current function).
HTTPd
-----
http( host, port, [cert, key, ca, crl]): create a new HTTP (SSL) daemon.
HTTPd (only usable for interfaces)
----------------------------------
httpd(): create a new HTTP daemon.
local h = vlc.httpd( "localhost", 8080 )
local h = vlc.httpd()
h:handler( url, user, password, callback, data ) -- add a handler for given url. If user and password are non nil, they will be used to authenticate connecting clients. callback will be called to handle connections. The callback function takes 7 arguments: data, url, request, type, in, addr, host. It returns the reply as a string.
h:file( url, mime, user, password, callback, data ) -- add a file for given url with given mime type. If user and password are non nil, they will be used to authenticate connecting clients. callback will be called to handle connections. The callback function takes 2 arguments: data and request. It returns the reply as a string.
h:redirect( url_dst, url_src ): Redirect all connections from url_src to url_dst.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment