From: Craig Andrews Date: Thu, 3 Sep 2009 22:34:30 +0000 (-0400) Subject: Improve OAuth CGI compatibility X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5974871b7b00bd8e3f28dc5f5a9465a9eec0d3d3;p=quix0rs-gnu-social.git Improve OAuth CGI compatibility Fixes http://status.net/trac/ticket/1822 Reported upstream at http://code.google.com/p/oauth/issues/detail?id=118 --- diff --git a/extlib/OAuth.php b/extlib/OAuth.php index 029166175c..fd48535545 100644 --- a/extlib/OAuth.php +++ b/extlib/OAuth.php @@ -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); }