From 7ed89c97f760600df238f9853ee453570935870f Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Fri, 18 Jun 2004 21:41:44 +0000 Subject: 2.0 alpha RELEASED! --- test/httptest.lua | 9 +++++---- test/testsrvr.lua | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/httptest.lua b/test/httptest.lua index 45d7e8d..0ba6f56 100644 --- a/test/httptest.lua +++ b/test/httptest.lua @@ -155,14 +155,15 @@ check_request(request, expect, ignore) io.write("testing simple post function: ") back = http.request("http://" .. host .. cgiprefix .. "/cat", index) assert(back == index) +print("ok") ------------------------------------------------------------------------ io.write("testing ltn12.(sink|source).file: ") request = { url = "http://" .. host .. cgiprefix .. "/cat", method = "POST", - source = ltn12.source.file(io.open(index_file, "r")), - sink = ltn12.sink.file(io.open(index_file .. "-back", "w")), + source = ltn12.source.file(io.open(index_file, "rb")), + sink = ltn12.sink.file(io.open(index_file .. "-back", "wb")), headers = { ["content-length"] = string.len(index) } } expect = { @@ -187,7 +188,7 @@ local function b64length(len) end local source = ltn12.source.chain( - ltn12.source.file(io.open(index_file, "r")), + ltn12.source.file(io.open(index_file, "rb")), ltn12.filter.chain( mime.encode("base64"), mime.wrap("base64") @@ -196,7 +197,7 @@ local source = ltn12.source.chain( local sink = ltn12.sink.chain( mime.decode("base64"), - ltn12.sink.file(io.open(index_file .. "-back", "w")) + ltn12.sink.file(io.open(index_file .. "-back", "wb")) ) request = { diff --git a/test/testsrvr.lua b/test/testsrvr.lua index 6e786c8..5b842f1 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua @@ -13,7 +13,6 @@ while 1 do -- control:setoption("nodelay", true) while 1 do command, error = control:receive() -print(error) if error then control:close() print("server: closing connection...") -- cgit v1.2.3-55-g6feb