[vlc-commits] LuaHTTP: Use binary instead of ASCII when serving rawfile

Edward Wang git at videolan.org
Wed Feb 1 22:42:36 CET 2012


vlc/vlc-2.0 | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Tue Jan 31 17:39:18 2012 -0500| [07e657f5002837f2868c2a0334fc77ac1abef486] | committer: Jean-Baptiste Kempf

LuaHTTP: Use binary instead of ASCII when serving rawfile

Close #5949

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 97111d1dbb62f64ab63a36c3a47c1cd166fe3c22)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=07e657f5002837f2868c2a0334fc77ac1abef486
---

 share/lua/intf/http.lua |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua
index 8c1dddb..8814c56 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -211,7 +211,7 @@ function rawfile(h,path,url,acl_)
             else
                 vlc.msg.dbg("Reloading `"..filename.."'")
             end
-            page = io.open(filename):read("*a")
+            page = io.open(filename,"rb"):read("*a")
             mtime = new_mtime
         end
         return page



More information about the vlc-commits mailing list