summaryrefslogtreecommitdiff
path: root/actions/twitapiaccount.php
diff options
context:
space:
mode:
authorzach <zach@controlyourself.ca>2008-08-19 17:49:23 -0400
committerzach <zach@controlyourself.ca>2008-08-19 17:49:23 -0400
commit0b87bf6c54f0ce4870683e976996be1a8c7c0fec (patch)
tree5701f19a0bcb1f82614b6de715e1d13cf3f75405 /actions/twitapiaccount.php
parent9c29b9ad629b573b6f09b681a0673805fc61ef6a (diff)
Twitter-compatible API - RESTfulness checks as per Twitter
darcs-hash:20080819214923-462f3-83ab492cb93c1ba643beb70853578cbd7ac35d61.gz
Diffstat (limited to 'actions/twitapiaccount.php')
-rw-r--r--actions/twitapiaccount.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php
index 716ddd154..3a9b8ba3e 100644
--- a/actions/twitapiaccount.php
+++ b/actions/twitapiaccount.php
@@ -61,6 +61,11 @@ class TwitapiaccountAction extends TwitterapiAction {
function update_location($args, $apidata) {
parent::handle($args);
+ if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ $this->client_error(_('This method requires a POST.'), 400, $apidata['content-type']);
+ exit();
+ }
+
$location = trim($this->arg('location'));
if (!is_null($location) && strlen($location) > 255) {