mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 21:51:34 +02:00
35 lines
1.9 KiB
Diff
35 lines
1.9 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,20 +43,21 @@ 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 skipped!")
|
|
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")
|
|
print("https -> http redirect, while not allowed OK!:", code)
|
|
copas.addthread(function()
|
|
redirect = "all"
|
|
- local result, code, headers, status = doreq("https://goo.gl/tBfqNu") -- https --> http security test case
|
|
- assert(tonumber(code)==200)
|
|
- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
|
|
- print("https -> http redirect, while allowed OK!")
|
|
+ -- local result, code, headers, status = doreq("https://goo.gl/tBfqNu") -- https --> http security test case
|
|
+ -- assert(tonumber(code)==200)
|
|
+ -- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
|
|
+ print("https -> http redirect, skipped while target is broken!")
|
|
done = true
|
|
end)
|
|
end)
|