From 174412018be90b23f1faf30467ac629b70b87d7a Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 26 Dec 2008 00:17:16 -0500 Subject: [PATCH 1/2] Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers (not the same patch as in trunk) darcs-hash:20081226051716-7b5ce-82040320785bab9438aa11cf5efa63fa4cba10ae.gz --- lib/twitter.php | 5 ++++- lib/util.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/twitter.php b/lib/twitter.php index 5c9ef5d6f5..7f75a1afd8 100644 --- a/lib/twitter.php +++ b/lib/twitter.php @@ -29,7 +29,10 @@ function get_twitter_data($uri, $screen_name, $password) { CURLOPT_FOLLOWLOCATION => true, // CURLOPT_USERAGENT => "identi.ca", CURLOPT_CONNECTTIMEOUT => 120, - CURLOPT_TIMEOUT => 120 + CURLOPT_TIMEOUT => 120, + + # Twitter is strict about accepting invalid "Expect" headers + CURLOPT_HTTPHEADER => array('Expect:') ); diff --git a/lib/util.php b/lib/util.php index 8eeda11156..7518fbf559 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1498,7 +1498,10 @@ function common_twitter_broadcast($notice, $flink) { CURLOPT_FOLLOWLOCATION => true, CURLOPT_USERAGENT => "Laconica", CURLOPT_CONNECTTIMEOUT => 120, // XXX: Scary!!!! How long should this be? - CURLOPT_TIMEOUT => 120 + CURLOPT_TIMEOUT => 120, + + # Twitter is strict about accepting invalid "Expect" headers + CURLOPT_HTTPHEADER => array('Expect:') ); $ch = curl_init($uri); From d3b1c1af1620764c9f6c2e1b692338e60ed8e706 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 30 Dec 2008 22:22:27 -0500 Subject: [PATCH 2/2] add 'dm' as a synonym for 'd' command darcs-hash:20081231032227-84dde-671346360e569522d5384663d4b808e329d4cf0c.gz --- classes/CommandInterpreter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/CommandInterpreter.php b/classes/CommandInterpreter.php index 4e27f8f796..eae315cb6b 100644 --- a/classes/CommandInterpreter.php +++ b/classes/CommandInterpreter.php @@ -103,6 +103,7 @@ class CommandInterpreter { return new GetCommand($user, $other); } case 'd': + case 'dm': if (!$arg) { return NULL; }