Skip to content

Commit 77c04b1

Browse files
nejchJohnVillalovos
authored andcommitted
refactor(client): remove handling for incorrect link header
This was a quirk only present in GitLab 13.0 and fixed with 13.1. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33714 and https://gitlab.com/gitlab-org/gitlab/-/issues/218504 for more context.
1 parent 9e0b60f commit 77c04b1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

gitlab/client.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,13 +1135,8 @@ def _query(
11351135
query_data = query_data or {}
11361136
result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
11371137
try:
1138-
links = result.links
1139-
if links:
1140-
next_url = links["next"]["url"]
1141-
else:
1142-
next_url = requests.utils.parse_header_links(result.headers["links"])[
1143-
0
1144-
]["url"]
1138+
next_url = result.links["next"]["url"]
1139+
11451140
# if the next url is different with user provided server URL
11461141
# then give a warning it may because of misconfiguration
11471142
# but if the option to fix provided then just reconstruct it

0 commit comments

Comments
 (0)