mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -801,7 +801,5 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
|
||||
r = requests.get(httpbin('status', '404'))
|
||||
r.text
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user