diff options
Diffstat (limited to 'test/httptest.lua')
-rw-r--r-- | test/httptest.lua | 5 |
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 | ------------------------------------------------------------------------ |
121 | io.write("testing invalid url: ") | 121 | io.write("testing invalid url: ") |
122 | local c, e = socket.connect("", 80) | 122 | local r, e = http.request{url = host .. prefix} |
123 | local r, re = http.request{url = host .. prefix} | 123 | assert(r == nil and e == "invalid host ''") |
124 | assert(r == nil and e == re) | ||
125 | r, re = http.request(host .. prefix) | 124 | r, re = http.request(host .. prefix) |
126 | assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. | 125 | assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. |
127 | " vs " .. tostring(e)) | 126 | " vs " .. tostring(e)) |