Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 29987: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 |
comparison
equal
deleted
inserted
replaced
29986:1d6b962dea92 | 29987:ff8e865bf524 |
---|---|
1859 int response_no = -1; | 1859 int response_no = -1; |
1860 char *token = NULL; | 1860 char *token = NULL; |
1861 | 1861 |
1862 totalelements = g_strv_length(split_data); | 1862 totalelements = g_strv_length(split_data); |
1863 | 1863 |
1864 if(totalelements == 1) | 1864 if(totalelements == 1) { |
1865 response_no = strtol(split_data[0], NULL, 10); | 1865 response_no = strtol(split_data[0], NULL, 10); |
1866 else if(totalelements >= 2) { | 1866 } else if(totalelements == 2 || totalelements == 3 ) { |
1867 response_no = strtol(split_data[0], NULL, 10); | 1867 response_no = strtol(split_data[0], NULL, 10); |
1868 token = g_strdup(split_data[1] + strlen("ymsgr=")); | 1868 token = g_strdup(split_data[1] + strlen("ymsgr=")); |
1869 } else { /* It looks like a transparent proxy has returned an invalid document */ | |
1870 response_no = -1; | |
1869 } | 1871 } |
1870 | 1872 |
1871 g_strfreev(split_data); | 1873 g_strfreev(split_data); |
1872 | 1874 |
1873 if(response_no != 0) { | 1875 if(response_no != 0) { |