Skip to content

Commit

Permalink
Fix oauth method detection code
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Aug 20, 2013
1 parent 380ff58 commit dae7544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codebird-cors-proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ function http_get_request_body()

// URLs always start with 1.1 or oauth
$version_pos = strpos($url, '/1.1/');
if ($version_pos === -1) {
if ($version_pos === false) {
$version_pos = strpos($url, '/oauth/');
}
if ($version_pos === -1) {
if ($version_pos === false) {
$version_pos = strpos($url, '/oauth2/');
}
if ($version_pos === -1) {
if ($version_pos === false) {
header('HTTP/1.1 412 Precondition failed');
die('This proxy only supports requests to API version 1.1.');
}
Expand Down

0 comments on commit dae7544

Please sign in to comment.