Abort the current request with a 304 (Not Modified) response code.
    Clears out the body of the response.

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 304

    .. todo: The following headers MUST be output: Date, ETag and/or
             Content-Location, Expires, Cache-Control, Vary. See :rfc:`2616`
             section 10.3.5.

def raise_304(instance):
    """Abort the current request with a 304 (Not Modified) response code.
    Clears out the body of the response.

    :param instance: Resource instance (used to access the response)
    :type instance: :class:`webob.resource.Resource`
    :raises: :class:`webob.exceptions.ResponseException` of status 304

    .. todo: The following headers MUST be output: Date, ETag and/or
             Content-Location, Expires, Cache-Control, Vary. See :rfc:`2616`
             section 10.3.5.
    """
    instance.response.status = 304
    instance.response.body = ''
    instance.response.body_raw = None
    raise ResponseException(instance.response)