From 79c51914ae22798b84045877d19f2195d0b3942e Mon Sep 17 00:00:00 2001 From: Eugene Kabanov Date: Sat, 30 Jul 2022 23:16:30 +0300 Subject: [PATCH] Fix jigsaw test. (#301) --- tests/testhttpclient.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/testhttpclient.nim b/tests/testhttpclient.nim index 6640468..412546d 100644 --- a/tests/testhttpclient.nim +++ b/tests/testhttpclient.nim @@ -689,12 +689,13 @@ suite "HTTP client testing suite": return "redirect-" & $res proc testBasicAuthorization(): Future[bool] {.async.} = - var session = createSession(true, maxRedirections = 10) - let url = parseUri("https://user:passwd@httpbin.org/basic-auth/user/passwd") + let session = HttpSessionRef.new({HttpClientFlag.NoVerifyHost}, + maxRedirections = 10) + let url = parseUri("https://guest:guest@jigsaw.w3.org/HTTP/Basic/") let resp = await session.fetch(url) await session.closeWait() if (resp.status == 200) and - ("true," in cast[string](resp.data)): + ("Your browser made it!" in bytesToString(resp.data)): return true else: return false