Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 4aad695, 0eb2509 · Browse files · 3 files+9 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+9 added−2 removed

  • tests:+6 added−2 removed
  • other:+3 added−0 removed

3 files+9 added−2 removed

modified:requests/models.py+3 added
679 unmodified lines
680 fp.read(2) # throw away crlf681 while 1:682 #XXX correct line size? (httplib has 64kb, seems insane)683 pending_bytes = fp.readline(40).strip()684 if pending_bytes == '':685 # No content, like a HEAD request. Break out.686 break687 pending_bytes = int(pending_bytes, 16)688 if pending_bytes == 0:689 break690 while pending_bytes:
113 unmodified lines
modified:tests/test_requests_ext.py+6 added
51 unmodified lines
52 def test_unicode_error(self):53 url = u'http://blip.fm/~1abvfu'54 requests.get(url)555657 def test_chunked_head_redirect(self):58 url = "http://t.co/NFrx0zLG"59 r = requests.head(url, allow_redirects=True)60 self.assertEqual(r.status_code, 200)6162if __name__ == '__main__':63 unittest.main()64
modified:tests/test_requests.py-2 removed
799 unmodified lines
800 def test_empty_response(self):801 r = requests.get(httpbin('status', '404'))802 r.text803804805804if __name__ == '__main__':805 unittest.main()