]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
add support for HTTP 308 redirects 1948/head
authorJeff Hunter <jeff@jeffhunter.me>
Thu, 9 Feb 2017 01:17:31 +0000 (17:17 -0800)
committerJeff Hunter <jeff@jeffhunter.me>
Thu, 9 Feb 2017 01:17:31 +0000 (17:17 -0800)
tornado/simple_httpclient.py

index adcf38b25f809c3d7019df7922f8ab0067955574..bce476c14e5aa2016ba86e87bff39d1a3b415354 100644 (file)
@@ -499,7 +499,7 @@ class _HTTPConnection(httputil.HTTPMessageDelegate):
     def _should_follow_redirect(self):
         return (self.request.follow_redirects and
                 self.request.max_redirects > 0 and
-                self.code in (301, 302, 303, 307))
+                self.code in (301, 302, 303, 307, 308))
 
     def finish(self):
         data = b''.join(self.chunks)