[vlc-devel] [PATCH] Fix share/lua/README.txt HTTPd documentation

Alejandro González alejandro.gonzalez.correo@gmail.com alejandro.gonzalez.correo at gmail.com
Thu Jun 21 19:52:31 CEST 2018


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:
https://github.com/videolan/vlc/blob/master/modules/lua/intf.c#L258
https://github.com/videolan/vlc/blob/master/modules/lua/libs/httpd.c#L82
---
 share/lua/README.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/share/lua/README.txt b/share/lua/README.txt
index c5a7d68..6d6ee64 100644
--- a/share/lua/README.txt
+++ b/share/lua/README.txt
@@ -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.
-- 
2.17.1.windows.1



More information about the vlc-devel mailing list