mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
test that empty body text responses work
This commit is contained in:
@@ -913,5 +913,12 @@ class RequestsTestSuite(TestSetup, TestBaseMixin, unittest.TestCase):
|
||||
r2 = requests.get(httpbin('get'), config=dict(keep_alive=False))
|
||||
self.assertEqual(r2.headers['Connection'].lower(), 'close')
|
||||
|
||||
def test_head_content(self):
|
||||
"""Test that empty bodies are properly supported."""
|
||||
|
||||
r = requests.head(httpbin('headers'))
|
||||
r.content
|
||||
r.text
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user