mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 14:17:37 +03:00
mod_httpserver: Read files in binary mode; fixes issues with serving binary files.
This commit is contained in:
parent
eeee71ebc1
commit
4750648ca6
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue