# HG changeset patch # User Waqas Hussain # Date 1260444437 -18000 # Node ID e05934a5c911fcc661f5f45e2fcfd0e1ac34dad1 # Parent d978e2ae70130c279172dcda7294efc0fb5f1bea mod_httpserver: Read files in binary mode; fixes issues with serving binary files. diff -r d978e2ae7013 -r e05934a5c911 plugins/mod_httpserver.lua --- 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();