aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-26 05:17:37 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-26 05:17:37 +0000
commit911e8d7e7f63e6e90814e82955bfaf26328afb19 (patch)
tree575a916f4616a0f865bff9928faa9be67a8c867e /test/httptest.lua
parentd914007507a6a4ad3489cca19652af403fef7074 (diff)
downloadluasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.tar.gz
luasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.tar.bz2
luasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.zip
Beta2 is out! Total timeout works on Windows.
Diffstat (limited to 'test/httptest.lua')
-rw-r--r--test/httptest.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index 31e8212..ce7a93b 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -116,6 +116,16 @@ ignore = {
116check_request(request, expect, ignore) 116check_request(request, expect, ignore)
117 117
118------------------------------------------------------------------------ 118------------------------------------------------------------------------
119io.write("testing invalid url: ")
120local c, e = socket.connect("", 80)
121local r, re = http.request{url = host .. prefix}
122assert(r == nil and e == re)
123r, re = http.request(host .. prefix)
124assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) ..
125 " vs " .. tostring(e))
126print("ok")
127
128------------------------------------------------------------------------
119io.write("testing post method: ") 129io.write("testing post method: ")
120-- wanted to test chunked post, but apache doesn't support it... 130-- wanted to test chunked post, but apache doesn't support it...
121request = { 131request = {
@@ -407,15 +417,6 @@ assert(r == nil and e == re)
407print("ok") 417print("ok")
408 418
409------------------------------------------------------------------------ 419------------------------------------------------------------------------
410io.write("testing invalid url: ")
411local c, e = socket.connect("", 80)
412local r, re = http.request{url = host .. prefix}
413assert(r == nil and e == re)
414r, re = http.request(host .. prefix)
415assert(r == nil and e == re)
416print("ok")
417
418------------------------------------------------------------------------
419print("passed all tests") 420print("passed all tests")
420os.remove("err") 421os.remove("err")
421 422