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
This commit is contained in:
Zach Copley 2008-12-26 00:17:16 -05:00
parent 29b6858f23
commit 174412018b
2 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,10 @@ function get_twitter_data($uri, $screen_name, $password) {
CURLOPT_FOLLOWLOCATION => true, CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_USERAGENT => "identi.ca", // CURLOPT_USERAGENT => "identi.ca",
CURLOPT_CONNECTTIMEOUT => 120, CURLOPT_CONNECTTIMEOUT => 120,
CURLOPT_TIMEOUT => 120 CURLOPT_TIMEOUT => 120,
# Twitter is strict about accepting invalid "Expect" headers
CURLOPT_HTTPHEADER => array('Expect:')
); );

View File

@ -1498,7 +1498,10 @@ function common_twitter_broadcast($notice, $flink) {
CURLOPT_FOLLOWLOCATION => true, CURLOPT_FOLLOWLOCATION => true,
CURLOPT_USERAGENT => "Laconica", CURLOPT_USERAGENT => "Laconica",
CURLOPT_CONNECTTIMEOUT => 120, // XXX: Scary!!!! How long should this be? 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); $ch = curl_init($uri);