Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine-brun committed Jun 4, 2024
1 parent cfc76e9 commit b7a5658
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions adapters/vnfm_generic/polld/vnfm_generic_poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ function getHeaders($respHeaders) {
$headers = array();

$headerText = substr($respHeaders, 0, strpos($respHeaders, "\r\n\r\n"));
echo "getting header text: $headerText\n";
foreach (explode("\r\n", $headerText) as $i => $line) {
if ($i === 0) {
$headers['http_code'] = $line;
} else {
echo "naveen--$line\n";
list ($key, $value) = explode(': ', $line);

$headers[$key] = $value;
}
}
Expand Down Expand Up @@ -91,7 +88,7 @@ function get_token($SIGNIN_REQ_PATH, $data, $auth_mode)
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header_raw = substr($ret, 0, $header_size);
$headers = getHeaders($header_raw);
debug_dump($headers, "get_token() headers: \n");
// debug_dump($headers, "get_token() headers: \n");
// sms_log_info(basename(__FILE__, '.php') . " polling $url with get_token() ret: $ret");
if (curl_errno($ch))
{
Expand All @@ -113,7 +110,6 @@ function get_token($SIGNIN_REQ_PATH, $data, $auth_mode)
curl_close($ch);
return curl_json_output($ret)->access_token;
} else if ($auth_mode == 'keystone') {
echo "===================================\n";
curl_close($ch);
$token=$headers['X-Subject-Token'];
return $token;
Expand Down

0 comments on commit b7a5658

Please sign in to comment.