summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2011-11-11 20:15:42 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2011-11-11 20:15:42 +0000
commit88c914500da915b0d95e29845d8c7d25b2cfab95 (patch)
tree4d0794546200d5d5a7660adc4d22a4cdb0ef8e7a /net-im/kmess/files
parentold (diff)
downloadgentoo-2-88c914500da915b0d95e29845d8c7d25b2cfab95.tar.gz
gentoo-2-88c914500da915b0d95e29845d8c7d25b2cfab95.tar.bz2
gentoo-2-88c914500da915b0d95e29845d8c7d25b2cfab95.zip
Add a better patch found on http://kmess.org/board/viewtopic.php?p=32892#p32892
(Portage version: 2.2.0_alpha73/cvs/Linux x86_64)
Diffstat (limited to 'net-im/kmess/files')
-rw-r--r--net-im/kmess/files/kmess-2.0.6-follow-location-redirects.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/net-im/kmess/files/kmess-2.0.6-follow-location-redirects.patch b/net-im/kmess/files/kmess-2.0.6-follow-location-redirects.patch
new file mode 100644
index 000000000000..fbabdeff44dd
--- /dev/null
+++ b/net-im/kmess/files/kmess-2.0.6-follow-location-redirects.patch
@@ -0,0 +1,34 @@
+Follow Location redirects, MS seems to have moved some accounts to other
+servers. Forum topic reference:
+Connection problem to wlm - http://kmess.org/board/viewtopic.php?f=4&t=20549
+diff -Nur a/src/network/soap/httpsoapconnection.cpp b/src/network/soap/httpsoapconnection.cpp
+--- a/src/network/soap/httpsoapconnection.cpp 2011-02-16 08:16:45.000000000 +0100
++++ b/src/network/soap/httpsoapconnection.cpp 2011-11-08 16:53:29.612517607 +0100
+@@ -456,6 +456,7 @@
+ const QByteArray& replyContents = reply->readAll();
+ const int statusCode = reply->attribute( QNetworkRequest::HttpStatusCodeAttribute ).toInt();
+ const QString error ( reply->attribute( QNetworkRequest::HttpReasonPhraseAttribute ).toString() );
++ QUrl redirectUrl = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
+
+ #ifdef KMESSDEBUG_HTTPSOAPCONNECTION_GENERAL
+ bool requestSuccess = false;
+@@ -490,13 +491,16 @@
+ #endif
+
+ // Parse the message contents
+- if( currentResponse->isFaultMessage() )
++ if( !redirectUrl.isEmpty() || currentResponse->isFaultMessage() )
+ {
+- // Verify if the server is redirecting us to another server
+ if( currentResponse->getFaultCode() == "psf:Redirect" )
+ {
++ redirectUrl = XmlFunctions::getNodeValue( currentResponse->getFault(), "redirectUrl" );
++ }
++ // Verify if the server is redirecting us to another server
++ if( !redirectUrl.isEmpty() )
++ {
+ const QUrl& originalUrl = currentResponse->getEndPoint();
+- const QUrl redirectUrl( XmlFunctions::getNodeValue( currentResponse->getFault(), "redirectUrl" ) );
+ const QString originalHost( originalUrl.host() );
+ const QString redirectHost( redirectUrl.host() );
+