diff options
Diffstat (limited to 'community/lua-copas/skip-broken-test.patch')
-rw-r--r-- | community/lua-copas/skip-broken-test.patch | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/community/lua-copas/skip-broken-test.patch b/community/lua-copas/skip-broken-test.patch index ea48eeaf47e..63f69911a9a 100644 --- a/community/lua-copas/skip-broken-test.patch +++ b/community/lua-copas/skip-broken-test.patch @@ -2,7 +2,7 @@ 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() +@@ -43,20 +43,21 @@ copas.addthread(function() assert(headers.location == "https://github.com/brunoos/luasec") print("http -> https redirect OK!") copas.addthread(function() @@ -14,7 +14,21 @@ index a47b42ba0f..1f23fd9e48 100644 + -- 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!") ++ 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) |