diff pidgin-twitter.c @ 161:5dcd8699cba0

added a workaround for posting via broken firewall, for example notorious "watchguard". if you got error code 400, try hidden prefs value "broken_firewall" be 1.
author Yoshiki Yazawa <yaz@honeyplnaet.jp>
date Sat, 26 Jul 2008 15:48:26 +0900
parents aef26b56a54b
children 1237fc885a92
line wrap: on
line diff
--- a/pidgin-twitter.c	Sat Jul 26 13:23:27 2008 +0900
+++ b/pidgin-twitter.c	Sat Jul 26 15:48:26 2008 +0900
@@ -717,7 +717,10 @@
     header = g_strdup_printf(TWITTER_STATUS_POST, basic_auth_encoded,
                              (int)strlen(status));
 
-    request = g_strconcat(header, status, TWITTER_STATUS_TERMINATOR, NULL);
+    if(purple_prefs_get_bool(OPT_BROKEN_FIREWALL))
+        request = g_strconcat(header, status, NULL);
+    else
+        request = g_strconcat(header, status, TWITTER_STATUS_TERMINATOR, NULL);
 
     purple_util_fetch_url_request(TWITTER_BASE_URL, FALSE,
                                   NULL, TRUE, request, TRUE,
@@ -2989,6 +2992,8 @@
     purple_prefs_add_bool(OPT_UPDATE_ICON, TRUE);
     purple_prefs_add_int(OPT_ICON_MAX_COUNT, DEFAULT_ICON_MAX_COUNT);
     purple_prefs_add_int(OPT_ICON_MAX_DAYS, DEFAULT_ICON_MAX_DAYS);
+
+    purple_prefs_add_bool(OPT_BROKEN_FIREWALL, FALSE);
 }
 
 PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info)