[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:50:13 CEST 2020
vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at 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 <linkfanel at 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..[[
More information about the vlc-commits
mailing list