* This sets the status, removes the body, and discards any headers

     * that MUST NOT be included in 304 responses.


public function setNotModified(): static


    public function setNotModified(): static

    {

        $this->setStatusCode(304);

        $this->setContent(null);


        // remove headers that MUST NOT be included with 304 Not Modified responses

        foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) {

            $this->headers->remove($header);

        }


        return $this;

    }

Powered by Froala Editor