Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Kenneth Reitz
2012-03-09 08:07:17 -08:00
3 changed files with 9 additions and 2 deletions
+3
View File
@@ -681,6 +681,9 @@ class Response(object):
while 1:
#XXX correct line size? (httplib has 64kb, seems insane)
pending_bytes = fp.readline(40).strip()
if pending_bytes == '':
# No content, like a HEAD request. Break out.
break
pending_bytes = int(pending_bytes, 16)
if pending_bytes == 0:
break
-2
View File
@@ -801,7 +801,5 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
r = requests.get(httpbin('status', '404'))
r.text
if __name__ == '__main__':
unittest.main()
+6
View File
@@ -53,6 +53,12 @@ class RequestsTestSuite(unittest.TestCase):
url = u'http://blip.fm/~1abvfu'
requests.get(url)
def test_chunked_head_redirect(self):
url = "http://t.co/NFrx0zLG"
r = requests.head(url, allow_redirects=True)
self.assertEqual(r.status_code, 200)
if __name__ == '__main__':
unittest.main()