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

Alejandro González git at videolan.org
Tue Jun 26 08:39:15 CEST 2018


vlc | branch: master | Alejandro González <alejandro.gonzalez.correo at gmail.com> | Thu Jun 21 19:52:31 2018 +0200| [9a52f71bc6ddfe0ba2bd0c80a8834717f7dbfdc1] | committer: Jean-Baptiste Kempf

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: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a52f71bc6ddfe0ba2bd0c80a8834717f7dbfdc1
---

 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 c5a7d68642..6d6ee64cfc 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.



More information about the vlc-commits mailing list