# HG changeset patch # User Waqas Hussain # Date 1260444437 -18000 # Node ID 591c8ae9ae09b39ad4ebd8afb72ab104bb4543a0 # Parent 18d83fd07db167e9ac606003f0d981dc8fd24012 mod_httpserver: Read files in binary mode; fixes issues with serving binary files. diff -r 18d83fd07db1 -r 591c8ae9ae09 plugins/mod_httpserver.lua --- a/plugins/mod_httpserver.lua Thu Dec 10 16:25:50 2009 +0500 +++ b/plugins/mod_httpserver.lua Thu Dec 10 16:27:17 2009 +0500 @@ -47,7 +47,7 @@ end function serve_file(path) - local f, err = open(http_base..path, "r"); + local f, err = open(http_base..path, "rb"); if not f then return response_404; end local data = f:read("*a"); f:close();