Mercurial > pidgin-twitter
comparison pidgin-twitter.c @ 162:1237fc885a92
revised http request. "broken_firewall" no longre needed?
author | Yoshiki Yazawa <yaz@honeyplnaet.jp> |
---|---|
date | Sat, 26 Jul 2008 21:13:34 +0900 |
parents | 5dcd8699cba0 |
children | 5043d4d9766d |
comparison
equal
deleted
inserted
replaced
161:5dcd8699cba0 | 162:1237fc885a92 |
---|---|
533 strlen(basic_auth)); | 533 strlen(basic_auth)); |
534 g_free(basic_auth); | 534 g_free(basic_auth); |
535 | 535 |
536 /* header */ | 536 /* header */ |
537 header = g_strdup_printf(TWITTER_STATUS_GET, basic_auth_encoded); | 537 header = g_strdup_printf(TWITTER_STATUS_GET, basic_auth_encoded); |
538 request = g_strconcat(header, TWITTER_STATUS_TERMINATOR, NULL); | 538 request = g_strconcat(header, "\r\n", NULL); |
539 | 539 |
540 /* invoke fetch */ | 540 /* invoke fetch */ |
541 purple_util_fetch_url_request(TWITTER_BASE_URL, FALSE, | 541 purple_util_fetch_url_request(TWITTER_BASE_URL, FALSE, |
542 NULL, TRUE, request, TRUE, | 542 NULL, TRUE, request, TRUE, |
543 get_status_with_api_cb, data); | 543 get_status_with_api_cb, data); |
711 basic_auth_encoded = purple_base64_encode((unsigned char *)basic_auth, | 711 basic_auth_encoded = purple_base64_encode((unsigned char *)basic_auth, |
712 strlen(basic_auth)); | 712 strlen(basic_auth)); |
713 g_free(basic_auth); | 713 g_free(basic_auth); |
714 | 714 |
715 status = g_strdup_printf(TWITTER_STATUS_FORMAT, url_encoded); | 715 status = g_strdup_printf(TWITTER_STATUS_FORMAT, url_encoded); |
716 | |
717 header = g_strdup_printf(TWITTER_STATUS_POST, basic_auth_encoded, | 716 header = g_strdup_printf(TWITTER_STATUS_POST, basic_auth_encoded, |
718 (int)strlen(status)); | 717 (int)strlen(status)); |
719 | 718 |
720 if(purple_prefs_get_bool(OPT_BROKEN_FIREWALL)) | 719 request = g_strconcat(header, "\r\n", status, "\r\n", NULL); |
721 request = g_strconcat(header, status, NULL); | |
722 else | |
723 request = g_strconcat(header, status, TWITTER_STATUS_TERMINATOR, NULL); | |
724 | 720 |
725 purple_util_fetch_url_request(TWITTER_BASE_URL, FALSE, | 721 purple_util_fetch_url_request(TWITTER_BASE_URL, FALSE, |
726 NULL, TRUE, request, TRUE, | 722 NULL, TRUE, request, TRUE, |
727 post_status_with_api_cb, tm); | 723 post_status_with_api_cb, tm); |
728 | 724 |