summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Petrov <andrey.petrov@shazow.net>2013-09-11 13:03:57 -0700
committerAndrey Petrov <andrey.petrov@shazow.net>2013-09-11 13:03:57 -0700
commit4f14bab32078d6f3ac2c371c0c921c9ab0ef954a (patch)
treed826d2934bb222cf6180249b271d1f892d3f2045
parentb31b4affb49b9b88a1a8215a25711ae93144940b (diff)
parenta4612bbd90e0ba6ab67ce9d26a5e171922e09d98 (diff)
downloadurllib3-4f14bab32078d6f3ac2c371c0c921c9ab0ef954a.tar.gz
Merge pull request #243 from oohlaf/permanent-redirect
Support redirect on 308
-rw-r--r--urllib3/connectionpool.py2
-rw-r--r--urllib3/response.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
index fc720e93..29064d71 100644
--- a/urllib3/connectionpool.py
+++ b/urllib3/connectionpool.py
@@ -465,7 +465,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
:param redirect:
If True, automatically handle redirects (status codes 301, 302,
- 303, 307). Each redirect counts as a retry.
+ 303, 307, 308). Each redirect counts as a retry.
:param assert_same_host:
If ``True``, will make sure that the host of the pool requests is
diff --git a/urllib3/response.py b/urllib3/response.py
index c7f93b82..3cd01772 100644
--- a/urllib3/response.py
+++ b/urllib3/response.py
@@ -107,7 +107,7 @@ class HTTPResponse(io.IOBase):
code and valid location. ``None`` if redirect status and no
location. ``False`` if not a redirect status code.
"""
- if self.status in [301, 302, 303, 307]:
+ if self.status in [301, 302, 303, 307, 308]:
return self.headers.get('location')
return False