vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfa...@yahoo.fr> | Sat Aug 22 
14:40:24 2020 +0200| [57e60891b7eee9655493b5be6565d4a8ef4e1c79] | 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.

(cherry picked from commit 0431e87b8c6801f8549509687524e6bc70fb7ec2)
Signed-off-by: Pierre Ynard <linkfa...@yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=57e60891b7eee9655493b5be6565d4a8ef4e1c79
---

 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 9841d9bab8..ba78b99d3a 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -168,7 +168,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..[[
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to