diff options
author | Steven Barth <steven@midlink.org> | 2008-06-28 17:03:47 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-28 17:03:47 +0000 |
commit | 8ca3b888ad91a40757c4b9cc00aea1a2ccf6a36d (patch) | |
tree | ca2074b0f8f12d186ad60ac5d3764c92fe05468a /libs/httpd | |
parent | 3fc7d3f5de08a6d750cc8ccbe124f23f29bad732 (diff) |
* libs/httpd: Fixed a problem with empty sources in filehandler
Diffstat (limited to 'libs/httpd')
-rw-r--r-- | libs/httpd/luasrc/httpd/handler/file.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/httpd/luasrc/httpd/handler/file.lua b/libs/httpd/luasrc/httpd/handler/file.lua index 790ebdd66..2ca3786ee 100644 --- a/libs/httpd/luasrc/httpd/handler/file.lua +++ b/libs/httpd/luasrc/httpd/handler/file.lua @@ -72,20 +72,16 @@ function Simple.handle_get(self, request, sourcein, sinkerr) } ), ltn12.source.file(io.open(file)) else - return Response( code, hdrs or { } ), - ltn12.source.empty() + return Response( code, hdrs or { } ) end else - return Response( code, hdrs or { } ), - ltn12.source.empty() + return Response( code, hdrs or { } ) end else - return Response( code, hdrs or { } ), - ltn12.source.empty() + return Response( code, hdrs or { } ) end else - return Response( code, hdrs or { } ), - ltn12.source.empty() + return Response( code, hdrs or { } ) end else return self:failure(403, "Unable to transmit " .. stat.type .. " " .. file) |