From 8f1b90173d71f83da30ddf61058e1d26af9b066e Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Thu, 21 Jan 2021 11:54:40 +0000 Subject: [PATCH] Do not parse the backend URL early It may contain sharding tokens ('%s'), which confuse the urllib3 parser needlessly. --- ai_web_common/rpc/core.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ai_web_common/rpc/core.py b/ai_web_common/rpc/core.py index a6785a2..edaf45d 100644 --- a/ai_web_common/rpc/core.py +++ b/ai_web_common/rpc/core.py @@ -172,9 +172,6 @@ class ClientStub(): if 'url' not in backend: raise ValueError('backend spec does not contain "url"') self._url = backend['url'].rstrip('/') - parsed_url = urllib3.util.parse_url(self._url) - self._host = parsed_url.host - self._port = parsed_url.port self._sso_service = backend.get('sso_service') self._sso_exchange = sso_exchange -- GitLab