aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2015-09-20 19:46:07 +0200
committerChristian Weiske <cweiske@cweiske.de>2015-09-20 19:46:07 +0200
commit15b372c9ce79ceb2d3c69247622f8c099f4adf7c (patch)
tree28afffb37a7b972d9cc85ee5acf832e3ad21bdd7 /lib
parenta784445c854e5b3dd6ff6719c4ef41a53cd55003 (diff)
downloadgrauphel-15b372c9ce79ceb2d3c69247622f8c099f4adf7c.tar.gz
grauphel-15b372c9ce79ceb2d3c69247622f8c099f4adf7c.zip
Fix #20 and #25: Add authorization header workaround for fcgid
Apparently the "Authorization" header are passed into PHP as HTTP_XAUTHORIZATION instead of HTTP_AUTHORIZATION.
Diffstat (limited to 'lib')
-rw-r--r--lib/oauth.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/oauth.php b/lib/oauth.php
index 4a652fc..4bc46dd 100644
--- a/lib/oauth.php
+++ b/lib/oauth.php
@@ -161,6 +161,11 @@ class OAuth
$params = array();
//$_SERVER['REDIRECT_HTTP_AUTHORIZATION'] = $_SERVER['HTTP_AUTHORIZATION'];
+ //copy http auth headers for apache+php-fcgid work around
+ if (isset($_SERVER['HTTP_XAUTHORIZATION']) && !isset($_SERVER['HTTP_AUTHORIZATION'])) {
+ $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['HTTP_XAUTHORIZATION'];
+ }
+
if (isset($_SERVER['HTTP_AUTHORIZATION'])
&& $_SERVER['HTTP_AUTHORIZATION'] == ''
) {