1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/lua-copas/skip-broken-test.patch
Kevin Daudt c1bba6bed3 community/lua-copas: skip broken test
The test verified that a http -> http redirect works. The service they
used (goo.gl), started to redirect to https first, so the result is
(http -> https -> http), which the library does not allow.

Skip this test for now.
2019-05-17 18:45:36 +00:00

20 lines
1.1 KiB
Diff

diff --git a/tests/httpredirect.lua b/tests/httpredirect.lua
index a47b42ba0f..1f23fd9e48 100644
--- a/tests/httpredirect.lua
+++ b/tests/httpredirect.lua
@@ -43,10 +43,11 @@ copas.addthread(function()
assert(headers.location == "https://github.com/brunoos/luasec")
print("http -> https redirect OK!")
copas.addthread(function()
- local result, code, headers, status = doreq("http://goo.gl/tBfqNu") -- http --> http redirect
- assert(tonumber(code)==200)
- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
- print("http -> http redirect OK!")
+ -- Broken test:
+ -- local result, code, headers, status = doreq("http://goo.gl/tBfqNu") -- http --> http redirect
+ -- assert(tonumber(code)==200)
+ -- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
+ -- print("http -> http redirect OK!")
copas.addthread(function()
local result, code, headers, status = doreq("https://goo.gl/tBfqNu") -- https --> http security test case
assert(result==nil and code == "Unallowed insecure redirect https to http")