diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-12-10 16:27:17 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-12-10 16:27:17 +0500 |
commit | 7ea7cdcbf3b1128da1db87da26c7b05f4f08fcbc (patch) | |
tree | 3412fac97f1ca772dd4c5309302834921ae5c97d /plugins/mod_httpserver.lua | |
parent | 62460850a80dd221e9d6fdfd6470f7f5ce391a41 (diff) | |
download | prosody-7ea7cdcbf3b1128da1db87da26c7b05f4f08fcbc.tar.gz prosody-7ea7cdcbf3b1128da1db87da26c7b05f4f08fcbc.zip |
mod_httpserver: Read files in binary mode; fixes issues with serving binary files.
Diffstat (limited to 'plugins/mod_httpserver.lua')
-rw-r--r-- | plugins/mod_httpserver.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 08328a43..426bbf2c 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -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(); |