From 2f6a605aa297cb197345fad80248170365884b4b Mon Sep 17 00:00:00 2001 From: jangko Date: Thu, 4 Jan 2024 11:53:15 +0700 Subject: [PATCH] Reenable test hhtps --- json_rpc/clients/httpclient.nim | 8 +++++++- tests/all.nim | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/json_rpc/clients/httpclient.nim b/json_rpc/clients/httpclient.nim index 097375c..1d136c1 100644 --- a/json_rpc/clients/httpclient.nim +++ b/json_rpc/clients/httpclient.nim @@ -41,9 +41,15 @@ const proc new( T: type RpcHttpClient, maxBodySize = MaxHttpRequestSize, secure = false, getHeaders: GetJsonRpcRequestHeaders = nil, flags: HttpClientFlags = {}): T = + + var moreFlags: HttpClientFlags + if secure: + moreFlags.incl HttpClientFlag.NoVerifyHost + moreFlags.incl HttpClientFlag.NoVerifyServerName + T( maxBodySize: maxBodySize, - httpSession: HttpSessionRef.new(flags = flags), + httpSession: HttpSessionRef.new(flags = flags + moreFlags), getHeaders: getHeaders ) diff --git a/tests/all.nim b/tests/all.nim index b669d87..feebc94 100644 --- a/tests/all.nim +++ b/tests/all.nim @@ -13,6 +13,7 @@ import testrpcmacro, testethcalls, testhttp, + testhttps, testserverclient, testproxy, testhook,