Merge "Drain and close response in StaticLargeObject.get_slo_segments"
This commit is contained in:
commit
f7cd2d905a
@ -1532,6 +1532,8 @@ class StaticLargeObject(object):
|
||||
except ValueError:
|
||||
raise HTTPServerError('Unable to load SLO manifest')
|
||||
else:
|
||||
# Drain and close GET request (prevents socket leaks)
|
||||
drain_and_close(resp)
|
||||
raise HTTPBadRequest('Not an SLO manifest')
|
||||
elif resp.status_int == HTTP_NOT_FOUND:
|
||||
raise HTTPNotFound('SLO manifest not found')
|
||||
|
@ -1490,6 +1490,7 @@ class TestSloDeleteManifest(SloTestCase):
|
||||
self.assertEqual(resp_data['Number Not Found'], 0)
|
||||
self.assertEqual(resp_data['Errors'],
|
||||
[['/deltest/a_1', 'Not an SLO manifest']])
|
||||
self.assertFalse(self.app.unread_requests)
|
||||
|
||||
def test_handle_multipart_delete_bad_json(self):
|
||||
req = Request.blank(
|
||||
|
Loading…
Reference in New Issue
Block a user