--- a/tests/http-timeout.lua +++ b/tests/http-timeout.lua @@ -123,7 +123,7 @@ timeout_bytes_response = nil -- make request local ok, rstatus, rheaders, rstatus_line = request { - url = "http://localhost:49500/some/path", + url = "http://127.0.0.1:49500/some/path", method = "POST", headers = request_headers, timeout = timeout, @@ -163,7 +163,7 @@ timeout_bytes_response = nil -- make request local ok, rstatus, rheaders, rstatus_line = request { - url = "http://localhost:49500/some/path", + url = "http://127.0.0.1:49500/some/path", method = "POST", headers = request_headers, timeout = timeout, @@ -203,7 +203,7 @@ timeout_bytes_response = nil -- make request local ok, rstatus, rheaders, rstatus_line = request { - url = "http://localhost:49500/some/path", + url = "http://127.0.0.1:49500/some/path", method = "POST", headers = request_headers, timeout = timeout, @@ -243,7 +243,7 @@ timeout_bytes_response = 100 -- after 100 bytes, is still in the headers -- make request local ok, rstatus, rheaders, rstatus_line = request { - url = "http://localhost:49500/some/path", + url = "http://127.0.0.1:49500/some/path", method = "POST", headers = request_headers, timeout = timeout, @@ -283,7 +283,7 @@ timeout_bytes_response = #response - 500 -- body = 1024, so 500 before end is right in the middle of the body -- make request local ok, rstatus, rheaders, rstatus_line = request { - url = "http://localhost:49500/some/path", + url = "http://127.0.0.1:49500/some/path", method = "POST", headers = request_headers, timeout = timeout, --- a/tests/httpredirect.lua +++ b/tests/httpredirect.lua @@ -61,7 +61,7 @@ skt:close() end) -- execute test request - local _, code, headers = doreq("http://localhost:9876/") -- http --> http redirect + local _, code, headers = doreq("http://127.0.0.1:9876/") -- http --> http redirect copas.removeserver(server) -- immediately close server again assert(tonumber(code)==200) assert(headers.location == "http://www.httpvshttps.com")