src/Valkyrja/Http/NativeResponse.php
public function setNotModified(): Response
    {
        $this->setStatusCode(StatusCode::NOT_MODIFIED);
        $this->setContent(null);
        $this->headers
            ->remove('Allow')
            ->remove('Content-Encoding')
            ->remove('Content-Language')
            ->remove('Content-Length')
            ->remove('Content-MD5')
            ->remove('Content-Type')
            ->remove('Last-Modified');

        return $this;
    }
public function setNotModified(): Response
    {
        $this->setStatusCode(StatusCode::NOT_MODIFIED);
        $this->setContent(null);
        $this->headers
            ->remove('Allow')
            ->remove('Content-Encoding')
            ->remove('Content-Language')
            ->remove('Content-Length')
            ->remove('Content-MD5')
            ->remove('Content-Type')
            ->remove('Last-Modified');

        return $this;
    }
Modifies the response so that it conforms to the rules defined for a 304
status code.

This sets the status, removes the body, and discards any headers
that MUST NOT be included in 304 responses.

@throws \InvalidArgumentException

@return \Valkyrja\Http\Response

@see http://tools.ietf.org/html/rfc2616#section-10.3.5