def notModified(published, request, response, etag=None, lastModified=None):
    """Return a ``304 NOT MODIFIED`` response. Modifies the response (status)
    and returns an empty body to indicate the request should be interrupted.

    ``etag`` is an ETag to set on the response
    ``lastModified`` is the last modified date to set on the response

    Both ``etag`` and ``lastModified`` are optional.
    """
    if etag is not None:
        response.setHeader('ETag', etag, literal=1)
    if response.getHeader('Last-Modified'):
        del response.headers['last-modified']
    if response.getHeader('Expires'):
        del response.headers['expires']
    if response.getHeader('Cache-Control'):
        del response.headers['cache-control']
    response.setStatus(304)
    return u''
