diff --git a/gitlab/client.py b/gitlab/client.py index b3223e5cf..e3290e145 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -685,7 +685,7 @@ def http_request( params = parse.parse_qs(parsed.query) utils.copy_dict(src=query_data, dest=params) - url = raw_url.replace(parsed.query, "").strip("?") + url = parse.urlunparse(parsed._replace(query="")) # Deal with kwargs: by default a user uses kwargs to send data to the # gitlab server, but this generates problems (python keyword conflicts