From e6a4b82e6e40a2346fd32eb63b0f8a47bf670257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Thu, 20 Dec 2007 08:57:55 +0000 Subject: #196535 by sun, chx, dww: check whether Drupal can issue HTTP requests at all, so we know that this is the cause of problems, not the remote host not responding. --- modules/openid/openid.module | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/openid') diff --git a/modules/openid/openid.module b/modules/openid/openid.module index cf58a9fbb..7e7114caa 100644 --- a/modules/openid/openid.module +++ b/modules/openid/openid.module @@ -290,6 +290,9 @@ function openid_discovery($claimed_id) { } } } + if (!$services) { + module_invoke('system', 'check_http_request'); + } return $services; } @@ -321,12 +324,14 @@ function openid_association($op_endpoint) { $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); if (isset($assoc_result->error)) { + module_invoke('system', 'check_http_request'); return FALSE; } $assoc_response = _openid_parse_message($assoc_result->data); if (isset($assoc_response['mode']) && $assoc_response['mode'] == 'error') { - return FALSE; + module_invoke('system', 'check_http_request'); + return FALSE; } if ($assoc_response['session_type'] == 'DH-SHA1') { @@ -487,6 +492,8 @@ function openid_verify_assertion($op_endpoint, $response) { } } } - + if (!$valid) { + module_invoke('system', 'check_http_request'); + } return $valid; } -- cgit v1.2.3