aports/community/lua-copas/ipv4-only.patch
Jakub Jirutka 50f2d81cbe community/lua-copas: upgrade to 4.7.0 and add lua5.4-*
It may be broken, but so is the current outdated version (2.0.2),
so this shouldn't make it worse.
2023-04-23 18:59:24 +00:00

59 lines
2.3 KiB
Diff

--- 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")