linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #03396
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2442: Prevent endless redirection loops with some Coral servers (hard to test - could be wrong)
------------------------------------------------------------
revno: 2442
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-02-25 18:43:09 +0100
message:
Prevent endless redirection loops with some Coral servers (hard to test - could be wrong)
modified:
changelog.txt
dcpp/HttpConnection.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2011-02-25 16:41:03 +0000
+++ changelog.txt 2011-02-25 17:43:09 +0000
@@ -14,6 +14,7 @@
* Continue from the beginning after reaching the end of a file list when searching (poy)
* Report the progress of file list searches in the status bar (poy)
* Repurpose Ctrl+F to in-place searches in chat windows & file lists (poy)
+* Prevent endless redirection loops with some Coral servers (poy)
-- 0.781 2011-01-12 --
* Add a dummy serial number to TLS certs to satisfy some parsers (poy)
=== modified file 'dcpp/HttpConnection.cpp'
--- dcpp/HttpConnection.cpp 2011-01-29 14:15:43 +0000
+++ dcpp/HttpConnection.cpp 2011-02-25 17:43:09 +0000
@@ -153,6 +153,12 @@
location302 = currentUrl.substr(0, i + 1) + location302;
}
}
+
+ if(location302 == currentUrl) {
+ fire(HttpConnectionListener::Failed(), this, str(F_("Endless redirection loop (%1%)") % currentUrl));
+ return;
+ }
+
fire(HttpConnectionListener::Redirected(), this, location302);
coralizeState = CST_DEFAULT;