def test_explicitRangeOverlappingEnd(self):
    "\n        A correct response to a bytes range header request from A to B when B\n        is past the end of the resource starts with the A'th byte and ends\n        with the last byte of the resource. The first byte of a page is\n        numbered with 0.\n        "
    self.request.requestHeaders.addRawHeader(b'range', b'bytes=40-100')
    self.resource.render(self.request)
    written = b''.join(self.request.written)
    self.assertEqual(written, self.payload[40:])
    self.assertEqual(self.request.responseCode, http.PARTIAL_CONTENT)
    self.assertEqual(self.request.responseHeaders.getRawHeaders(b'content-range')[0], b'bytes 40-63/64')
    self.assertEqual((b'%d' % (len(written),)), self.request.responseHeaders.getRawHeaders(b'content-length')[0])
A correct response to a bytes range header request from A to B when B
is past the end of the resource starts with the A'th byte and ends
with the last byte of the resource. The first byte of a page is
numbered with 0.
def test_explicitRangeOverlappingEnd(self):
    "\n        A correct response to a bytes range header request from A to B when B\n        is past the end of the resource starts with the A'th byte and ends\n        with the last byte of the resource. The first byte of a page is\n        numbered with 0.\n        "
    self.request.requestHeaders.addRawHeader(b'range', b'bytes=40-100')
    self.resource.render(self.request)
    written = b.join(self.request.written)
    self.assertEqual(written, self.payload[40:])
    self.assertEqual(self.request.responseCode, http.PARTIAL_CONTENT)
    self.assertEqual(self.request.responseHeaders.getRawHeaders(b'content-range')[0], b'bytes 40-63/64')
    self.assertEqual((b'%d' % (len(written),)), self.request.responseHeaders.getRawHeaders(b'content-length')[0])