Skip to content

Commit

Permalink
refactor(client): remove handling for incorrect link header
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nejch authored and JohnVillalovos committed Aug 4, 2022
1 parent 9e0b60f commit 77c04b1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions gitlab/client.py
Expand Up @@ -1135,13 +1135,8 @@ def _query(
query_data = query_data or {}
result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
try:
links = result.links
if links:
next_url = links["next"]["url"]
else:
next_url = requests.utils.parse_header_links(result.headers["links"])[
0
]["url"]
next_url = result.links["next"]["url"]

# if the next url is different with user provided server URL
# then give a warning it may because of misconfiguration
# but if the option to fix provided then just reconstruct it
Expand Down

0 comments on commit 77c04b1

Please sign in to comment.