1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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)
|