/cpw/tomkiewicz/http: 1bcbdca07787: Allow infinite amount of red...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue Oct 16 07:28:18 EDT 2012


Changeset: 1bcbdca07787c40e8f0ce7421e577f2f7616dd89
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-10-16 13:28 +0200
Branch:	 default
URL: http://hg.pidgin.im/cpw/tomkiewicz/http/rev/1bcbdca07787

Description:

Allow infinite amount of redirects

diffstat:

 libpurple/http.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -607,8 +607,8 @@ static void _purple_http_recv(gpointer _
 
 		redirect = purple_http_headers_get(hc->response->headers,
 			"location");
-		if (redirect &&
-			hc->request->max_redirects > hc->redirects_count) {
+		if (redirect && (hc->request->max_redirects == -1 ||
+			hc->request->max_redirects > hc->redirects_count)) {
 			PurpleHttpURL *url = purple_http_url_parse(redirect);
 
 			hc->redirects_count++;



More information about the Commits mailing list