Software /
code /
prosody
Diff
plugins/mod_httpserver.lua @ 2773:591c8ae9ae09
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 |
parent | 2772:18d83fd07db1 |
child | 2774:55ec6991c1a8 |
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();