summaryrefslogtreecommitdiff
path: root/modules/openid/openid.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-26 21:01:57 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-26 21:01:57 +0000
commit445823f6bbb1eeef744f6838b7a0c5aab34af57d (patch)
tree4f52b9dcf1e4d63e357a58ed851d966542ea228c /modules/openid/openid.module
parent0d100b57dcffe54ec7f46d8f577a4c26fcf34202 (diff)
downloadbrdo-445823f6bbb1eeef744f6838b7a0c5aab34af57d.tar.gz
brdo-445823f6bbb1eeef744f6838b7a0c5aab34af57d.tar.bz2
- Patch #337783 by Dave Reid, drewish: array-itize drupal_http_requests()'s parameters.
Diffstat (limited to 'modules/openid/openid.module')
-rw-r--r--modules/openid/openid.module20
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/openid/openid.module b/modules/openid/openid.module
index affe9787e..d024105f4 100644
--- a/modules/openid/openid.module
+++ b/modules/openid/openid.module
@@ -272,7 +272,7 @@ function openid_discovery($claimed_id) {
if ($url['scheme'] == 'http' || $url['scheme'] == 'https') {
// For regular URLs, try Yadis resolution first, then HTML-based discovery
$headers = array('Accept' => 'application/xrds+xml');
- $result = drupal_http_request($xrds_url, $headers);
+ $result = drupal_http_request($xrds_url, array('headers' => $headers));
if (!isset($result->error)) {
if (isset($result->headers['Content-Type']) && preg_match("/application\/xrds\+xml/", $result->headers['Content-Type'])) {
@@ -290,7 +290,7 @@ function openid_discovery($claimed_id) {
}
if (!empty($xrds_url)) {
$headers = array('Accept' => 'application/xrds+xml');
- $xrds_result = drupal_http_request($xrds_url, $headers);
+ $xrds_result = drupal_http_request($xrds_url, array('headers' => $headers));
if (!isset($xrds_result->error)) {
$services = xrds_parse($xrds_result->data);
}
@@ -347,8 +347,12 @@ function openid_association($op_endpoint) {
// If there is no existing association, then request one
$assoc_request = openid_association_request($public);
$assoc_message = _openid_encode_message(_openid_create_message($assoc_request));
- $assoc_headers = array('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8');
- $assoc_result = drupal_http_request($op_endpoint, $assoc_headers, 'POST', $assoc_message);
+ $assoc_options = array(
+ 'headers' => array('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8'),
+ 'method' => 'POST',
+ 'data' => $assoc_message,
+ );
+ $assoc_result = drupal_http_request($op_endpoint, $assoc_options);
if (isset($assoc_result->error)) {
module_invoke('system', 'check_http_request');
return FALSE;
@@ -509,8 +513,12 @@ function openid_verify_assertion($op_endpoint, $response) {
$request = $response;
$request['openid.mode'] = 'check_authentication';
$message = _openid_create_message($request);
- $headers = array('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8');
- $result = drupal_http_request($op_endpoint, $headers, 'POST', _openid_encode_message($message));
+ $options = array(
+ 'headers' => array('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8'),
+ 'method' => 'POST',
+ 'data' => _openid_encode_message($message),
+ );
+ $result = drupal_http_request($op_endpoint, $options);
if (!isset($result->error)) {
$response = _openid_parse_message($result->data);
if (strtolower(trim($response['is_valid'])) == 'true') {