aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2007-03-12 04:08:40 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2007-03-12 04:08:40 +0000
commitbe2e467929be9f27fbe92fe7b94783635c920c06 (patch)
tree94054e38f33178d805a6144d3bd9cb76da4a4c76 /test/httptest.lua
parent8bf9fb51dd09fb066483247fccbfc979acc84071 (diff)
downloadluasocket-be2e467929be9f27fbe92fe7b94783635c920c06.tar.gz
luasocket-be2e467929be9f27fbe92fe7b94783635c920c06.tar.bz2
luasocket-be2e467929be9f27fbe92fe7b94783635c920c06.zip
Couple bug fixes.
Diffstat (limited to 'test/httptest.lua')
-rw-r--r--test/httptest.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index ac60787..dd53ec3 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -119,9 +119,8 @@ check_request(request, expect, ignore)
119 119
120------------------------------------------------------------------------ 120------------------------------------------------------------------------
121io.write("testing invalid url: ") 121io.write("testing invalid url: ")
122local c, e = socket.connect("", 80) 122local r, e = http.request{url = host .. prefix}
123local r, re = http.request{url = host .. prefix} 123assert(r == nil and e == "invalid host ''")
124assert(r == nil and e == re)
125r, re = http.request(host .. prefix) 124r, re = http.request(host .. prefix)
126assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. 125assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) ..
127 " vs " .. tostring(e)) 126 " vs " .. tostring(e))