diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -21,6 +21,7 @@ Utilities library for RhodeCode """ import datetime + import decorator import logging import os @@ -31,6 +32,7 @@ import socket import tempfile import traceback import tarfile +import urllib.parse import warnings from functools import wraps from os.path import join as jn @@ -849,7 +851,7 @@ def call_service_api(ini_path, payload): 'auth_token': config.get('app:main', 'app.service_api.token') }) - response = CurlSession().post(f'{host}{api_url}', json.dumps(payload)) + response = CurlSession().post(urllib.parse.urljoin(host, api_url), json.dumps(payload)) if response.status_code != 200: raise Exception("Service API responded with error")