def can_parse_body(headers, buffer):
    """
    Checks whether a request's headers signal a body to parse.

    :param headers: A dict of header: value pairs.
    :param buffer: a bytes object.
    :return: Boolean.
    """
    content_length = int(headers.get('content-length', '0'))
    return 'content-length' in headers and len(buffer) == content_length