/pidgin/main: cefaf531281e: HTTP: Fix a glib warning for imprope...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Nov 6 19:51:34 EST 2013


Changeset: cefaf531281e8386003852699b4695f9ce18b5e5
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-11-07 01:51 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/cefaf531281e

Description:

HTTP: Fix a glib warning for improper HTTP response

diffstat:

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

diffs (17 lines):

diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -1117,9 +1117,10 @@ static gboolean _purple_http_recv_loopbo
 			purple_http_conn_retry(hc);
 			return FALSE;
 		} else {
-			if (g_ascii_strcasecmp(purple_http_headers_get(
-				hc->response->headers, "Server"),
-				"YHttpServer") == 0)
+			const gchar *server = purple_http_headers_get(
+				hc->response->headers, "Server");
+			if (server &&
+				g_ascii_strcasecmp(server, "YHttpServer") == 0)
 			{
 				purple_debug_warning("http", "No more data "
 					"while parsing headers (YHttpServer "



More information about the Commits mailing list