From 5aa8f5bc01d8e0518ae3270efb2ddf70abf8d029 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Sat, 27 Apr 2013 22:22:20 +0200 Subject: [PATCH] Added own CookieJar to not return a Session Cookie, rem Auth Callback The auth callback is not needed as we send an Basic Auth header. --- src/mirall/owncloudinfo.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/mirall/owncloudinfo.cpp b/src/mirall/owncloudinfo.cpp index 24ff34c95..48222797d 100644 --- a/src/mirall/owncloudinfo.cpp +++ b/src/mirall/owncloudinfo.cpp @@ -30,6 +30,17 @@ namespace Mirall { +class oCCookieJar : public QNetworkCookieJar +{ +public: + QList cookiesForUrl ( const QUrl & url ) const { + QList list; + return list; + } + +}; + + ownCloudInfo *ownCloudInfo::_instance = 0; ownCloudInfo* ownCloudInfo::instance() @@ -70,8 +81,15 @@ void ownCloudInfo::setNetworkAccessManager( QNetworkAccessManager* qnam ) connect( _manager, SIGNAL( sslErrors(QNetworkReply*, QList)), this, SIGNAL(sslFailed(QNetworkReply*, QList)) ); + // The authenticationRequired signal is not handled because the creds are set + // in the request header. +#if 0 connect( _manager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(slotAuthentication(QNetworkReply*,QAuthenticator*))); +#endif + + // no cookie jar so far. + _manager->setCookieJar(new oCCookieJar); _certsUntrusted = false; @@ -246,6 +264,8 @@ void ownCloudInfo::slotMkdirFinished() } #endif +// FIXME: remove this later, once the new connection dialog has settled. +#if 0 void ownCloudInfo::slotAuthentication( QNetworkReply *reply, QAuthenticator *auth ) { if( !(auth && reply) ) return; @@ -282,6 +302,7 @@ void ownCloudInfo::slotAuthentication( QNetworkReply *reply, QAuthenticator *aut reply->close(); } } +#endif QString ownCloudInfo::configHandle(QNetworkReply *reply) {