GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: don't raise `RedirectError` for redirected `HEAD` requests · python-gitlab/python-gitlab@8fc13b9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • gitlab
    • client.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎gitlab/client.py‎

Copy file name to clipboardExpand all lines: gitlab/client.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ def _check_redirects(result: requests.Response) -> None:
625625
for item in result.history:
626626
if item.status_code not in (301, 302):
627627
continue
628-
# GET methods can be redirected without issue
629-
if item.request.method == "GET":
628+
# GET and HEAD methods can be redirected without issue
629+
if item.request.method in ("GET", "HEAD"):
630630
continue
631631
target = item.headers.get("location")
632632
raise gitlab.exceptions.RedirectError(

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.