Software /
code /
prosody
Changeset
2358:e05934a5c911
mod_httpserver: Read files in binary mode; fixes issues with serving binary files.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 10 Dec 2009 16:27:17 +0500 |
parents | 2357:d978e2ae7013 |
children | 2359:0bed4af40bff |
files | plugins/mod_httpserver.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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();