aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-12-10 16:27:17 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-12-10 16:27:17 +0500
commit4750648ca68e97469dcbcd1fba84c82708a80b09 (patch)
tree94fd010574af8420b54c5861305d32419062436c /plugins
parenteeee71ebc14b11389266a04ac29f0adf0710a16f (diff)
downloadprosody-4750648ca68e97469dcbcd1fba84c82708a80b09.tar.gz
prosody-4750648ca68e97469dcbcd1fba84c82708a80b09.zip
mod_httpserver: Read files in binary mode; fixes issues with serving binary files.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_httpserver.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua
index 24247596..7135f479 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();