From e92c7ed64f91e9a7886ed280d98dfd95b1110345 Mon Sep 17 00:00:00 2001 From: Tobias Stein Date: Tue, 10 Sep 2019 14:46:57 +0200 Subject: [PATCH] Remove xnat server version from session because this meta information is not available be default since xnat > 1.7 --- Libs/XNAT/Core/ctkXnatSession.cpp | 37 ------------------------------- 1 file changed, 37 deletions(-) diff --git a/Libs/XNAT/Core/ctkXnatSession.cpp b/Libs/XNAT/Core/ctkXnatSession.cpp index f21798c231..25f8d79f68 100644 --- a/Libs/XNAT/Core/ctkXnatSession.cpp +++ b/Libs/XNAT/Core/ctkXnatSession.cpp @@ -52,7 +52,6 @@ static const char* HEADER_AUTHORIZATION = "Authorization"; static const char* HEADER_USER_AGENT = "User-Agent"; static const char* HEADER_COOKIE = "Cookie"; -static QString SERVER_VERSION = "version"; static QString SESSION_EXPIRATION_DATE = "expires"; //---------------------------------------------------------------------------- @@ -90,7 +89,6 @@ class ctkXnatSessionPrivate void createConnections(); void setDefaultHttpHeaders(); void checkSession() const; - void setSessionProperties(); QDateTime updateExpirationDate(qRestResult* restResult); void close(); @@ -185,27 +183,6 @@ void ctkXnatSessionPrivate::checkSession() const } } -//---------------------------------------------------------------------------- -void ctkXnatSessionPrivate::setSessionProperties() -{ - sessionProperties.clear(); - QUuid uuid = xnat->get("/data/version"); - QScopedPointer restResult(xnat->takeResult(uuid)); - if (restResult) - { - QString version = restResult->result()["content"].toString(); - if (version.isEmpty()) - { - throw ctkXnatProtocolFailureException("No version information available."); - } - sessionProperties[SERVER_VERSION] = version; - } - else - { - this->throwXnatException("Retrieving session properties failed."); - } -} - //---------------------------------------------------------------------------- QDateTime ctkXnatSessionPrivate::updateExpirationDate(qRestResult* restResult) { @@ -386,7 +363,6 @@ void ctkXnatSession::open() QString sessionId = restResult->result()["content"].toString(); d->sessionId = sessionId; d->setDefaultHttpHeaders(); - d->setSessionProperties(); d->updateExpirationDate(restResult.data()); } else @@ -417,19 +393,6 @@ bool ctkXnatSession::isOpen() const return !d->sessionId.isEmpty(); } -//---------------------------------------------------------------------------- -QString ctkXnatSession::version() const -{ - Q_D(const ctkXnatSession); - if (d->sessionProperties.contains(SERVER_VERSION)) - { - return d->sessionProperties[SERVER_VERSION]; - } - else - { - return QString::null; - } -} //---------------------------------------------------------------------------- QDateTime ctkXnatSession::expirationDate() const