Mercurial > pidgin
diff libpurple/protocols/yahoo/libymsg.c @ 29587:ff8e865bf524
Attempt to handle transparent proxies that return documents instead of errors.
I think this fixes #11478.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 13 Mar 2010 20:24:52 +0000 |
parents | 2b9db39bd7ed |
children | 78f972c7de0e |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c Fri Mar 12 22:00:00 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Mar 13 20:24:52 2010 +0000 @@ -1861,11 +1861,13 @@ totalelements = g_strv_length(split_data); - if(totalelements == 1) + if(totalelements == 1) { response_no = strtol(split_data[0], NULL, 10); - else if(totalelements >= 2) { + } else if(totalelements == 2 || totalelements == 3 ) { response_no = strtol(split_data[0], NULL, 10); token = g_strdup(split_data[1] + strlen("ymsgr=")); + } else { /* It looks like a transparent proxy has returned an invalid document */ + response_no = -1; } g_strfreev(split_data);