Ticket #6141: httpcomms.patch.txt

File httpcomms.patch.txt, 897 bytes (added by jstorm@…, 11 years ago)

Patch for httpcomms.cpp

Line 
1--- mythtv/libs/libmythdb/httpcomms.cpp 2009-01-17 15:53:02.836084611 -0600
2+++ mythtv/libs/libmythdb/httpcomms.cpp 2009-01-17 18:59:53.248037918 -0600
3@@ -599,8 +599,15 @@
4                                 .arg(httpGrabber->getRedirectedURL())
5                                 .arg(redirectCount)
6                                 .arg(maxRedirects));
7-            if (redirectCount++ < maxRedirects)
8-                url = QUrl( httpGrabber->getRedirectedURL() );
9+
10+             // Increment the counter and check were not over the limit
11+            if (redirectCount++ >= maxRedirects)
12+            {
13+                VERBOSE(VB_IMPORTANT, QString("Maximum redirections reached for url: %1").arg(url.toString()));
14+                break;
15+            }
16+
17+            url = QUrl( httpGrabber->getRedirectedURL() );
18 
19             // Try again
20             timeoutCount = 0;