diff options
author | George Roman <george.roman.99@gmail.com> | 2018-05-24 09:46:33 +0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-28 14:16:08 -0300 |
commit | 0e8089c20e43e92e9351a71e92396b83faf23632 (patch) | |
tree | 3c8544c9c5f8bc4f48eea9f234e132a71206bd8a /spec/util/mock-server.lua | |
parent | 4ac4aad3bf7e37c6e1467f1885036850f903d70c (diff) | |
download | luarocks-0e8089c20e43e92e9351a71e92396b83faf23632.tar.gz luarocks-0e8089c20e43e92e9351a71e92396b83faf23632.tar.bz2 luarocks-0e8089c20e43e92e9351a71e92396b83faf23632.zip |
Make the mock server run on Windows
Diffstat (limited to 'spec/util/mock-server.lua')
-rw-r--r-- | spec/util/mock-server.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/util/mock-server.lua b/spec/util/mock-server.lua index ae41b964..8e498d57 100644 --- a/spec/util/mock-server.lua +++ b/spec/util/mock-server.lua | |||
@@ -71,7 +71,7 @@ server:add_resource("/file/{name:[^/]+}", { | |||
71 | produces = "text/plain", | 71 | produces = "text/plain", |
72 | handler = function(query, name) | 72 | handler = function(query, name) |
73 | local basedir = arg[1] or "./spec/fixtures" | 73 | local basedir = arg[1] or "./spec/fixtures" |
74 | local fd = io.open(basedir .. "/" .. name, "r") | 74 | local fd = io.open(basedir .. "/" .. name, "rb") |
75 | if not fd then | 75 | if not fd then |
76 | return restserver.response():status(404) | 76 | return restserver.response():status(404) |
77 | end | 77 | end |