diff options
Diffstat (limited to 'test/httptest.lua')
-rw-r--r-- | test/httptest.lua | 10 |
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") | |||
420 | io.write("testing HEAD method: ") | 420 | io.write("testing HEAD method: ") |
421 | local r, c, h = http.request { | 421 | local 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 | } |
425 | assert(r and h and (c == 200), c) | 425 | assert(r and h and (c == 200), c) |
426 | print("ok") | 426 | print("ok") |
427 | 427 | ||
428 | ------------------------------------------------------------------------ | 428 | ------------------------------------------------------------------------ |
429 | io.write("testing host not found: ") | 429 | io.write("testing host not found: ") |
430 | local c, e = socket.connect("wronghost", 80) | 430 | local c, e = socket.connect("example.invalid", 80) |
431 | local r, re = http.request{url = "http://wronghost/does/not/exist"} | 431 | local r, re = http.request{url = "http://example.invalid/does/not/exist"} |
432 | assert(r == nil and e == re) | 432 | assert(r == nil and e == re, tostring(r) .. " " .. tostring(re)) |
433 | r, re = http.request("http://wronghost/does/not/exist") | 433 | r, re = http.request("http://example.invalid/does/not/exist") |
434 | assert(r == nil and e == re) | 434 | assert(r == nil and e == re) |
435 | print("ok") | 435 | print("ok") |
436 | 436 | ||