[vlc-commits] lua/http: fix art handler for missing art file extension and MIME type

Pierre Ynard git at videolan.org
Sat Aug 22 14:43:48 CEST 2020


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Aug 22 14:40:24 2020 +0200| [0431e87b8c6801f8549509687524e6bc70fb7ec2] | committer: Pierre Ynard

lua/http: fix art handler for missing art file extension and MIME type

... as is the case with art from the local cache.

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

 share/lua/intf/http.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua
index 04f60b091a..b30bf4a807 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -169,7 +169,7 @@ function callback_art(data, request, args)
         local size = vlc.net.stat(filename).size
         local ext = string.match(filename,"%.([^%.]-)$")
         local raw = io.open(filename, 'rb'):read("*a")
-        local content = [[Content-Type: ]]..mimes[ext]..[[
+        local content = [[Content-Type: ]]..(mimes[ext] or "application/octet-stream")..[[
 
 Content-Length: ]]..size..[[
 



More information about the vlc-commits mailing list