mod_httpserver: Read files in binary mode; fixes issues with serving binary files.

This commit is contained in:
Waqas Hussain 2009-12-10 16:27:17 +05:00
parent eeee71ebc1
commit 4750648ca6

View file

@ -47,7 +47,7 @@ local function preprocess_path(path)
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();