You are here

function acquia_search_extract_hmac in Acquia Search 6

Same name and namespace in other branches
  1. 6.3 acquia_search.module \acquia_search_extract_hmac()

Look in the headers and get the hmac_digest out

Return value

string hmac_digest

3 calls to acquia_search_extract_hmac()
Acquia_Search_Service::makeServletRequest in ./Acquia_Search_Service.php
Make a request to a servlet (a path) that's not a standard path.
Acquia_Search_Service::_sendRawGet in ./Acquia_Search_Service.php
Central method for making a get operation against this Solr Server
Acquia_Search_Service::_sendRawPost in ./Acquia_Search_Service.php
Central method for making a post operation against this Solr Server

File

./acquia_search.module, line 363
Integration between Acquia Drupal and Acquia's hosted solr search service.

Code

function acquia_search_extract_hmac($http_response_header) {
  $reg = array();
  if (is_array($http_response_header)) {
    foreach ($http_response_header as $header) {
      if (preg_match("/Pragma:.*hmac_digest=(.+);/i", $header, $reg)) {
        return trim($reg[1]);
      }
    }
  }
  return '';
}