From 0960ff733875fd98f052a0e505c1a5e7e293491d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 9 Jan 2009 14:26:15 -0800 Subject: [PATCH] Works properly now with twitter due to december twitter server change Twitter stopped liking the: Expect: 100-continue header, so we need to override that with an empty "Expect" line in order to get it working again. --- bti.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bti.c b/bti.c index 941be79..feaab36 100644 --- a/bti.c +++ b/bti.c @@ -194,6 +194,7 @@ static int send_tweet(struct session *session) CURLcode res; struct curl_httppost *formpost = NULL; struct curl_httppost *lastptr = NULL; + struct curl_slist *slist = NULL; if (!session) return -EINVAL; @@ -220,6 +221,12 @@ static int send_tweet(struct session *session) switch (session->host) { case HOST_TWITTER: curl_easy_setopt(curl, CURLOPT_URL, twitter_url); + /* + * twitter doesn't like the "Expect: 100-continue" header + * anymore, so turn it off. + */ + slist = curl_slist_append(slist, "Expect:"); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist); break; case HOST_IDENTICA: curl_easy_setopt(curl, CURLOPT_URL, identica_url); -- 2.39.5