aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
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))