Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Alex Alexander (wired)" <wired@g.o>
Subject: gentoo-x86 commit in net-im/bitlbee/files: bitlbee-3.0.3-msn-login-fix.patch
Date: Mon, 14 Nov 2011 23:31:48 +0000 (UTC)
wired       11/11/14 23:31:48

  Added:                bitlbee-3.0.3-msn-login-fix.patch
  Log:
  fix for msn login failures
  
  (Portage version: 2.2.0_alpha74/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  net-im/bitlbee/files/bitlbee-3.0.3-msn-login-fix.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/bitlbee/files/bitlbee-3.0.3-msn-login-fix.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/bitlbee/files/bitlbee-3.0.3-msn-login-fix.patch?rev=1.1&content-type=text/plain

Index: bitlbee-3.0.3-msn-login-fix.patch
===================================================================
fix for msn login failures

http://bugs.bitlbee.org/bitlbee/changeset/devel,824
--- lib/http_client.c.old
+++ lib/http_client.c
@@ -313,7 +313,7 @@
 		req->status_code = -1;
 	}
 	
-	if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 )
+	if( ( req->status_code >= 301 && req->status_code <= 303 ) && req->redir_ttl-- > 0 )
 	{
 		char *loc, *new_request, *new_host;
 		int error = 0, new_port, new_proto;
@@ -374,10 +374,13 @@
 			/* So, now I just allocated enough memory, so I'm
 			   going to use strcat(), whether you like it or not. :-) */
 			
-			sprintf( new_request, "GET %s HTTP/1.0", url->file );
+			s = 0;
+			sprintf( new_request, "%s %s HTTP/1.0\r\nHost: %s",
+				req->status_code == 303 || req->request[0] == 'G' ? "GET" : "POST", url->file, url->host );
+			s = ' ';
 			
-			s = strstr( req->request, "\r\n" );
-			if( s == NULL )
+			if( !( ( s = strstr( req->request, "\r\nHost: " ) ) &&
+				( s = strstr( s + strlen( "\r\nHost: " ), "\r\n" ) ) ) )
 			{
 				req->status_string = g_strdup( "Error while rebuilding request string" );
 				g_free( new_request );





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in app-admin/lsyncd: ChangeLog lsyncd-2.0.5.ebuild
Next by thread:
gentoo-x86 commit in net-im/bitlbee: ChangeLog bitlbee-3.0.3-r1.ebuild
Previous by date:
proj/gentoopm:master commit in: gentoopm/pkgcorepm/
Next by date:
gentoo-x86 commit in net-im/bitlbee: ChangeLog bitlbee-3.0.3-r1.ebuild


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.