diff --git a/lib/OAuth.php b/lib/OAuth.php
index 4a56f0a..53d78e4 100644
--- a/lib/OAuth.php
+++ b/lib/OAuth.php
@@ -814,6 +814,15 @@ class OAuthUtil {
         }
       }
     }
+
+    // If we have running php5.2 as cgi, and defined in htaccess this directive
+    // RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+    // We need this to get it working
+    // Ref: http://drupal.org/node/328222
+    if (!isset($out['HTTP_AUTHORIZATION']) && isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
+      $out['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
+    }
+
     return $out;
   }
 
