diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-08-24 17:09:55 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-08-24 17:09:55 +0200 |
commit | a221d7b35bc20da758e7467fe789e16613c54275 (patch) | |
tree | a3d669b74286f4185b28d9cd5d7e2722b08ce58f /gitlab/exceptions.py | |
parent | 80a68f9258422d5d74f05a20234070ce3d6f5559 (diff) | |
download | gitlab-a221d7b35bc20da758e7467fe789e16613c54275.tar.gz |
Raise an exception on https redirects for PUT/POST
POST and PUT requests are modified by clients when redirections happen.
A common problem with python-gitlab is a misconfiguration of the server
URL: the http to https redirection breaks some requests.
With this change python-gitlab should detect problematic redirections,
and raise a proper exception instead of failing with a cryptic error.
Closes #565
Diffstat (limited to 'gitlab/exceptions.py')
-rw-r--r-- | gitlab/exceptions.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/exceptions.py b/gitlab/exceptions.py index 6736f67..650328a 100644 --- a/gitlab/exceptions.py +++ b/gitlab/exceptions.py @@ -41,6 +41,10 @@ class GitlabAuthenticationError(GitlabError): pass +class RedirectError(GitlabError): + pass + + class GitlabParsingError(GitlabError): pass |