mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
Beta2 is out! Total timeout works on Windows.
This commit is contained in:
@ -115,6 +115,16 @@ ignore = {
|
||||
}
|
||||
check_request(request, expect, ignore)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
io.write("testing invalid url: ")
|
||||
local c, e = socket.connect("", 80)
|
||||
local r, re = http.request{url = host .. prefix}
|
||||
assert(r == nil and e == re)
|
||||
r, re = http.request(host .. prefix)
|
||||
assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) ..
|
||||
" vs " .. tostring(e))
|
||||
print("ok")
|
||||
|
||||
------------------------------------------------------------------------
|
||||
io.write("testing post method: ")
|
||||
-- wanted to test chunked post, but apache doesn't support it...
|
||||
@ -406,15 +416,6 @@ r, re = http.request("http://wronghost/does/not/exist")
|
||||
assert(r == nil and e == re)
|
||||
print("ok")
|
||||
|
||||
------------------------------------------------------------------------
|
||||
io.write("testing invalid url: ")
|
||||
local c, e = socket.connect("", 80)
|
||||
local r, re = http.request{url = host .. prefix}
|
||||
assert(r == nil and e == re)
|
||||
r, re = http.request(host .. prefix)
|
||||
assert(r == nil and e == re)
|
||||
print("ok")
|
||||
|
||||
------------------------------------------------------------------------
|
||||
print("passed all tests")
|
||||
os.remove("err")
|
||||
|
Reference in New Issue
Block a user