static public function check(FedoraResource $res): bool {
        if (self::$client === null) {
            self::$client = new Client([
                'verify'  => false,
            ]);
        }

        $headers = [];
        if (isset($_SERVER['PHP_AUTH_USER'])) {
            $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW']);
        }
        $cookies = [];
        foreach ($_COOKIE as $k => $v) {
            $cookies[] = $k . '=' . $v;
        }
        if (count($cookies) > 0) {
            $headers['Cookie'] = implode('; ', $cookies);
        }

        $req = new Request('GET', $res->getUri() . '/fcr:metadata', $headers);
        try {
            $resp = self::$client->send($req);
            return true;
        } catch (RequestException $ex) {
            if ($ex->hasResponse()) {
                $resp = $ex->getResponse();
                if (in_array($resp->getStatusCode(), [401, 403])) {
                    return false;
                }
            }
            throw $ex;
        }
    }