summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2008-12-25 10:22:07 -0500
committerZach Copley <zach@controlyourself.ca>2008-12-25 10:22:07 -0500
commitaeafd0579a7278dfbb09351d695db7ab1fe6d303 (patch)
tree8cbdb22bd49299fc86bc74002f6a9c902e49a0bb /lib
parentb264c03d32d04d7a33d28a5830848660f4484943 (diff)
Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers
darcs-hash:20081225152207-7b5ce-fe890baabaa8f0bf60b05f7558c1ece3544d9906.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/twitter.php6
-rw-r--r--lib/util.php5
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/twitter.php b/lib/twitter.php
index 07871fb20..5eb15005a 100644
--- a/lib/twitter.php
+++ b/lib/twitter.php
@@ -28,9 +28,11 @@ function get_twitter_data($uri, $screen_name, $password)
CURLOPT_FAILONERROR => true,
CURLOPT_HEADER => false,
CURLOPT_FOLLOWLOCATION => true,
- // CURLOPT_USERAGENT => "identi.ca",
+ # 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 32201f2be..fbe04c6c4 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1571,7 +1571,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);