protected function _checkModified($request, $response, $server)
    {
        $modifiedTime = false;

        try {
            /** @var int|string|false $modifiedTime */
            $modifiedTime = $server->getSource()
                ->getTimestamp($server->getSourcePath($this->_path));
        } catch (Exception $exception) {
            return $this->_handleException($request, $response, $exception);
        }

        if ($modifiedTime === false) {
            return $modifiedTime;
        }

        if ($this->_isNotModified($request, $modifiedTime)) {
            $response = new Response(['status' => 304]);
            $response = $this->_withCustomHeaders($response);

            return $response->withHeader('Last-Modified', (string)$modifiedTime);
        }

        return (int)$modifiedTime;
    }