protected function getCachingHeaders($fileinfo)
    {
        // Set default values:
        $last_modified = gmdate('D, d M Y H:i:s', $fileinfo[9]) . ' GMT';
        $etag = md5($last_modified);

        // See if the client has provided the required HTTP headers:
        $if_modified_since = $this->server_value('HTTP_IF_MODIFIED_SINCE', false);
        $if_none_match = $this->server_value('HTTP_IF_NONE_MATCH', false);

        if ($if_modified_since && $if_none_match && $if_none_match == $etag && $if_modified_since == $last_modified) {
            $this->status = 304;
        }

        // Send appropriate response:
        $this->headers['Last-Modified'] = $last_modified;
        $this->headers['ETag'] = $etag;
    }