<div dir="ltr">Hi <span style="color:rgb(32,33,36);font-size:0.875rem;letter-spacing:0.2px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;white-space:nowrap">Rémi.</span><div>You are right. I can't assume that file type always matches the file extension. </div><div>But on the line 177-179 the same :)<br><br>        <b>local ext = string.match(filename,"%.([^%.]-)$")</b><br>        local raw = io.open(filename, 'rb'):read("*a")<br>        <b>local content = [[Content-Type: ]]..mimes[ext]..[[</b></div><div><b><br></b></div><div>Best regards,</div><div>Alexandr<br><table cellpadding="0" class="gmail-cf gmail-gJ" style="border-collapse:collapse;margin-top:0px;width:auto;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:0.2px;display:block"><tbody style="display:block"><tr class="gmail-acZ" style="height:auto;display:flex"><td class="gmail-gF gmail-gK" style="white-space:nowrap;padding:0px;vertical-align:top;width:720.409px;line-height:20px;display:block;max-height:20px"><table cellpadding="0" class="gmail-cf gmail-ix" style="border-collapse:collapse;table-layout:fixed;width:720px"><tbody><tr><td class="gmail-c2" style="display:flex"><h3 class="gmail-iw" style="overflow:hidden;font-size:0.75rem;font-weight:inherit;margin:inherit;text-overflow:ellipsis;letter-spacing:0.3px;color:rgb(95,99,104);line-height:20px"><br></h3></td></tr></tbody></table></td></tr></tbody></table><table cellpadding="0" class="gmail-cf gmail-gJ" style="border-collapse:collapse;margin-top:0px;width:auto;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:0.2px;display:block"><tbody style="display:block"></tbody></table></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 12 июл. 2019 г. в 15:31, Rémi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi,<br><br>I don't follow the logic here. You can't assume that file type always matches the file extension.<br><br><div class="gmail_quote">Le 12 juillet 2019 14:06:51 GMT+03:00, Alexandr Koverninsky <<a href="mailto:a.koverninsky@gmail.com" target="_blank">a.koverninsky@gmail.com</a>> a écrit :<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<pre class="gmail-m_4069912673257941636k9mail"><hr> share/lua/intf/http.lua | 4 ++++<br> 1 file changed, 4 insertions(+)<br><br>diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua<br>index fc6d1a3156..d40f423bee 100644<br>--- a/share/lua/intf/http.lua<br>+++ b/share/lua/intf/http.lua<br>@@ -78,6 +78,10 @@ function process_raw(filename)<br>     --]]<br>     local code0 = string.gsub(input,escape(close_tag)," print(["..str.."[")<br>     local code1 = string.gsub(code0,escape(open_tag),"]"..str.."]) ")<br>+    local fileext=filename:match("^.+(%..+)$")<br>+    if fileext == ".js" then<br>+      code1=input;<br>+    end<br>     local code = "print(["..str.."["..code1.."]"..str.."])"<br>     --[[ Uncomment to debug<br>     if string.match(filename,"vlm_cmd.xml$") then</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</div>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div>