Skip to content

Commit 6d1b62d

Browse files
chore: use urlunparse instead of string replace
Use the `urlunparse()` function to reconstruct the URL without the query parameters.
1 parent d263f57 commit 6d1b62d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitlab/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def http_request(
685685
params = parse.parse_qs(parsed.query)
686686
utils.copy_dict(src=query_data, dest=params)
687687

688-
url = raw_url.replace(parsed.query, "").strip("?")
688+
url = parse.urlunparse(parsed._replace(query=""))
689689

690690
# Deal with kwargs: by default a user uses kwargs to send data to the
691691
# gitlab server, but this generates problems (python keyword conflicts

0 commit comments

Comments
 (0)