]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Improve OAuth CGI compatibility
authorCraig Andrews <candrews@integralblue.com>
Thu, 3 Sep 2009 22:34:30 +0000 (18:34 -0400)
committerCraig Andrews <candrews@integralblue.com>
Thu, 3 Sep 2009 22:35:46 +0000 (18:35 -0400)
Fixes http://status.net/trac/ticket/1822
Reported upstream at http://code.google.com/p/oauth/issues/detail?id=118

extlib/OAuth.php

index 029166175c5f4b6ad07fac4bb47ea0502c7b95f9..fd485355459843c2bbf41d6240d687423d56d6f9 100644 (file)
@@ -199,7 +199,8 @@ class OAuthRequest {/*{{{*/
     } else {
       // collect request parameters from query string (GET) and post-data (POST) if appropriate (note: POST vars have priority)
       $req_parameters = $_GET;
-      if ($http_method == "POST" && @strstr($request_headers["Content-Type"], "application/x-www-form-urlencoded") ) {
+      if ($http_method == "POST" &&
+        ( @strstr($request_headers["Content-Type"], "application/x-www-form-urlencoded") || @strstr($_ENV["CONTENT_TYPE"], "application/x-www-form-urlencoded") )) {
         $req_parameters = array_merge($req_parameters, $_POST);
       }