add status code 308 to _REDIRECT_STATUSES
add status code 308 to _REDIRECT_STATUSES as designed by rfc7238 Closes-bug: 1610914 Change-Id: I81ce137dad07e76a0f0c227dc8b263eec64fff7a
This commit is contained in:
parent
4a0ac4583b
commit
837118393c
@ -211,7 +211,7 @@ class Session(object):
|
||||
|
||||
user_agent = None
|
||||
|
||||
_REDIRECT_STATUSES = (301, 302, 303, 305, 307)
|
||||
_REDIRECT_STATUSES = (301, 302, 303, 305, 307, 308)
|
||||
|
||||
_DEFAULT_REDIRECT_LIMIT = 30
|
||||
|
||||
|
@ -362,6 +362,12 @@ class RedirectTests(utils.TestCase):
|
||||
self.assertEqual(r.url, s.url)
|
||||
self.assertEqual(r.status_code, s.status_code)
|
||||
|
||||
def test_permanent_redirect_308(self):
|
||||
session = client_session.Session()
|
||||
self.setup_redirects(status_code=308)
|
||||
resp = session.get(self.REDIRECT_CHAIN[-2])
|
||||
self.assertResponse(resp)
|
||||
|
||||
|
||||
class AuthPlugin(plugin.BaseAuthPlugin):
|
||||
"""Very simple debug authentication plugin.
|
||||
|
Loading…
Reference in New Issue
Block a user