aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/httptest.lua')
-rw-r--r--test/httptest.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index dd53ec3..9d50a14 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -420,17 +420,17 @@ print("ok")
420io.write("testing HEAD method: ") 420io.write("testing HEAD method: ")
421local r, c, h = http.request { 421local r, c, h = http.request {
422 method = "HEAD", 422 method = "HEAD",
423 url = "http://www.cs.princeton.edu/~diego/" 423 url = "http://www.tecgraf.puc-rio.br/~diego/"
424} 424}
425assert(r and h and (c == 200), c) 425assert(r and h and (c == 200), c)
426print("ok") 426print("ok")
427 427
428------------------------------------------------------------------------ 428------------------------------------------------------------------------
429io.write("testing host not found: ") 429io.write("testing host not found: ")
430local c, e = socket.connect("wronghost", 80) 430local c, e = socket.connect("example.invalid", 80)
431local r, re = http.request{url = "http://wronghost/does/not/exist"} 431local r, re = http.request{url = "http://example.invalid/does/not/exist"}
432assert(r == nil and e == re) 432assert(r == nil and e == re, tostring(r) .. " " .. tostring(re))
433r, re = http.request("http://wronghost/does/not/exist") 433r, re = http.request("http://example.invalid/does/not/exist")
434assert(r == nil and e == re) 434assert(r == nil and e == re)
435print("ok") 435print("ok")
436 436