'Set up the response for Range headers that specify a single range.
This method checks if the request is satisfiable and sets the response
code and Content-Range header appropriately.  The return value
indicates which part of the resource to return.
@param request: The Request object.
@param startAndEnd: A 2-tuple of start of the byte range as specified by
the header and the end of the byte range as specified by the header.
At most one of the start and end may be L{None}.
@return: A 2-tuple of the offset and size of the range to return.
offset == size == 0 indicates that the request is not satisfiable.'

def _doSingleRangeRequest(self, request, startAndEnd):

    (start, end) = startAndEnd
    (offset, size) = self._rangeToOffsetAndSize(start, end)
    if (offset == size == 0):
        request.setResponseCode(http.REQUESTED_RANGE_NOT_SATISFIABLE)
        request.setHeader('content-range', networkString(('bytes    */%d' % (self.getFileSize(),))))
    else:
        request.setResponseCode(http.PARTIAL_CONTENT)
        request.setHeader('content-range', self._contentRange(offset, size))
    return (offset, size)
