'Finds a multipart boundary in data.
Should no boundry exist in the data None is returned instead. Otherwise
a tuple containing the indices of the following are returned:
* the end of current encapsulation
* the start of the next encapsulation'

def _find_boundary(self, data, eof=False):

    index = self._fs(data)
    if (index < 0):
        return None
    else:
        end = index
        next = (index + len(self._boundary))
        last = max(0, (end - 1))
        if (data[last:(last + 1)] == '\n'):
            end -= 1
        last = max(0, (end - 1))
        if (data[last:(last + 1)] == '\r'):
            end -= 1
        return (end, next)
